Commit 028ce527 authored by Bas Nieuwenhuizen's avatar Bas Nieuwenhuizen
Browse files

radv: Add non-uniform indexing lowering.



This patch does it as late as possible so the potential extra
basic blocks don't inhibit other optimizations.

Big thanks to Jason for writing the lowering pass.
Reviewed-by: Samuel Pitoiset's avatarSamuel Pitoiset <samuel.pitoiset@gmail.com>
parent 282bacab
Pipeline #29548 passed with stages
in 10 minutes and 56 seconds
......@@ -817,13 +817,13 @@ void radv_GetPhysicalDeviceFeatures2(
features->shaderInputAttachmentArrayDynamicIndexing = true;
features->shaderUniformTexelBufferArrayDynamicIndexing = true;
features->shaderStorageTexelBufferArrayDynamicIndexing = true;
features->shaderUniformBufferArrayNonUniformIndexing = false;
features->shaderSampledImageArrayNonUniformIndexing = false;
features->shaderStorageBufferArrayNonUniformIndexing = false;
features->shaderStorageImageArrayNonUniformIndexing = false;
features->shaderInputAttachmentArrayNonUniformIndexing = false;
features->shaderUniformTexelBufferArrayNonUniformIndexing = false;
features->shaderStorageTexelBufferArrayNonUniformIndexing = false;
features->shaderUniformBufferArrayNonUniformIndexing = true;
features->shaderSampledImageArrayNonUniformIndexing = true;
features->shaderStorageBufferArrayNonUniformIndexing = true;
features->shaderStorageImageArrayNonUniformIndexing = true;
features->shaderInputAttachmentArrayNonUniformIndexing = true;
features->shaderUniformTexelBufferArrayNonUniformIndexing = true;
features->shaderStorageTexelBufferArrayNonUniformIndexing = true;
features->descriptorBindingUniformBufferUpdateAfterBind = true;
features->descriptorBindingSampledImageUpdateAfterBind = true;
features->descriptorBindingStorageImageUpdateAfterBind = true;
......
......@@ -2178,6 +2178,11 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
for (int i = 0; i < MESA_SHADER_STAGES; ++i) {
if (nir[i]) {
NIR_PASS_V(nir[i], nir_lower_bool_to_int32);
NIR_PASS_V(nir[i], nir_lower_non_uniform_access,
nir_lower_non_uniform_ubo_access |
nir_lower_non_uniform_ssbo_access |
nir_lower_non_uniform_texture_access |
nir_lower_non_uniform_image_access);
}
if (radv_can_dump_shader(device, modules[i], false))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment