1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Rename RD uniform "type" to "uniform_type"

"type" isn't very descriptive for exposed code, and this variable is exposed via RD_SETGET.
This commit is contained in:
Aaron Franke
2020-10-16 21:19:21 -04:00
parent 40b81339d0
commit 19bdd01438
12 changed files with 281 additions and 281 deletions

View File

@@ -1298,7 +1298,7 @@ bool RendererStorageRD::canvas_texture_get_uniform_set(RID p_texture, RS::Canvas
Vector<RD::Uniform> uniforms;
{ //diffuse
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_TEXTURE;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.binding = 0;
t = texture_owner.getornull(ct->diffuse);
@@ -1313,7 +1313,7 @@ bool RendererStorageRD::canvas_texture_get_uniform_set(RID p_texture, RS::Canvas
}
{ //normal
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_TEXTURE;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.binding = 1;
t = texture_owner.getornull(ct->normalmap);
@@ -1328,7 +1328,7 @@ bool RendererStorageRD::canvas_texture_get_uniform_set(RID p_texture, RS::Canvas
}
{ //specular
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_TEXTURE;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.binding = 2;
t = texture_owner.getornull(ct->specular);
@@ -1343,7 +1343,7 @@ bool RendererStorageRD::canvas_texture_get_uniform_set(RID p_texture, RS::Canvas
}
{ //sampler
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_SAMPLER;
u.uniform_type = RD::UNIFORM_TYPE_SAMPLER;
u.binding = 3;
u.ids.push_back(sampler_rd_get_default(filter, repeat));
uniforms.push_back(u);
@@ -3591,14 +3591,14 @@ void RendererStorageRD::particles_set_amount(RID p_particles, int p_amount) {
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 1;
u.ids.push_back(particles->particle_buffer);
uniforms.push_back(u);
}
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 2;
u.ids.push_back(particles->particle_instance_buffer);
uniforms.push_back(u);
@@ -3901,14 +3901,14 @@ void RendererStorageRD::_particles_process(Particles *p_particles, float p_delta
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 0;
u.ids.push_back(p_particles->frame_params_buffer);
uniforms.push_back(u);
}
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 1;
u.ids.push_back(p_particles->particle_buffer);
uniforms.push_back(u);
@@ -3916,7 +3916,7 @@ void RendererStorageRD::_particles_process(Particles *p_particles, float p_delta
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 2;
if (p_particles->emission_storage_buffer.is_valid()) {
u.ids.push_back(p_particles->emission_storage_buffer);
@@ -3927,7 +3927,7 @@ void RendererStorageRD::_particles_process(Particles *p_particles, float p_delta
}
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 3;
Particles *sub_emitter = particles_owner.getornull(p_particles->sub_emitter);
if (sub_emitter) {
@@ -4134,7 +4134,7 @@ void RendererStorageRD::_particles_process(Particles *p_particles, float p_delta
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_TEXTURE;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.binding = 0;
for (uint32_t i = 0; i < ParticlesFrameParams::MAX_3D_TEXTURES; i++) {
RID rd_tex;
@@ -4154,7 +4154,7 @@ void RendererStorageRD::_particles_process(Particles *p_particles, float p_delta
}
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_TEXTURE;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.binding = 1;
if (collision_heightmap_texture.is_valid()) {
u.ids.push_back(collision_heightmap_texture);
@@ -4255,7 +4255,7 @@ void RendererStorageRD::particles_set_view_axis(RID p_particles, const Vector3 &
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 0;
u.ids.push_back(particles->particles_sort_buffer);
uniforms.push_back(u);
@@ -4614,7 +4614,7 @@ void RendererStorageRD::ParticlesMaterialData::update_parameters(const Map<Strin
{
if (shader_data->ubo_size) {
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_UNIFORM_BUFFER;
u.uniform_type = RD::UNIFORM_TYPE_UNIFORM_BUFFER;
u.binding = 0;
u.ids.push_back(uniform_buffer);
uniforms.push_back(u);
@@ -4623,7 +4623,7 @@ void RendererStorageRD::ParticlesMaterialData::update_parameters(const Map<Strin
const RID *textures = texture_cache.ptrw();
for (uint32_t i = 0; i < tex_uniform_count; i++) {
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_TEXTURE;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.binding = 1 + i;
u.ids.push_back(textures[i]);
uniforms.push_back(u);
@@ -5617,21 +5617,21 @@ void RendererStorageRD::gi_probe_allocate(RID p_gi_probe, const Transform &p_to_
Vector<RD::Uniform> uniforms;
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 1;
u.ids.push_back(gi_probe->octree_buffer);
uniforms.push_back(u);
}
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 2;
u.ids.push_back(gi_probe->data_buffer);
uniforms.push_back(u);
}
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_IMAGE;
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
u.binding = 3;
u.ids.push_back(shared_tex);
uniforms.push_back(u);
@@ -6494,28 +6494,28 @@ void RendererStorageRD::_render_target_allocate_sdf(RenderTarget *rt) {
Vector<RD::Uniform> uniforms;
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_IMAGE;
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
u.binding = 1;
u.ids.push_back(rt->sdf_buffer_write);
uniforms.push_back(u);
}
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_IMAGE;
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
u.binding = 2;
u.ids.push_back(rt->sdf_buffer_read);
uniforms.push_back(u);
}
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_IMAGE;
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
u.binding = 3;
u.ids.push_back(rt->sdf_buffer_process[0]);
uniforms.push_back(u);
}
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_IMAGE;
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
u.binding = 4;
u.ids.push_back(rt->sdf_buffer_process[1]);
uniforms.push_back(u);
@@ -8453,7 +8453,7 @@ RendererStorageRD::RendererStorageRD() {
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_SAMPLER;
u.uniform_type = RD::UNIFORM_TYPE_SAMPLER;
u.binding = 1;
u.ids.resize(12);
RID *ids_ptr = u.ids.ptrw();
@@ -8474,7 +8474,7 @@ RendererStorageRD::RendererStorageRD() {
{
RD::Uniform u;
u.type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 2;
u.ids.push_back(global_variables_get_storage_buffer());
uniforms.push_back(u);