radv: lower view_index to zero if multiview is disabled
Apparently, gl_ViewIndex can be used if multiview is disabled. See https://gitlab.freedesktop.org/mesa/mesa/-/issues/4446 Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9718>
This commit is contained in:
@@ -3338,27 +3338,17 @@ VkResult radv_create_shaders(struct radv_pipeline *pipeline,
|
||||
|
||||
for (unsigned i = 0; i < MESA_SHADER_STAGES; ++i) {
|
||||
const VkPipelineShaderStageCreateInfo *stage = pStages[i];
|
||||
unsigned subgroup_size = 64, ballot_bit_size = 64;
|
||||
|
||||
if (!modules[i])
|
||||
continue;
|
||||
|
||||
radv_start_feedback(stage_feedbacks[i]);
|
||||
|
||||
if (pipeline_key->compute_subgroup_size) {
|
||||
/* Only compute shaders currently support requiring a
|
||||
* specific subgroup size.
|
||||
*/
|
||||
assert(i == MESA_SHADER_COMPUTE);
|
||||
subgroup_size = pipeline_key->compute_subgroup_size;
|
||||
ballot_bit_size = pipeline_key->compute_subgroup_size;
|
||||
}
|
||||
|
||||
nir[i] = radv_shader_compile_to_nir(device, modules[i],
|
||||
stage ? stage->pName : "main", i,
|
||||
stage ? stage->pSpecializationInfo : NULL,
|
||||
flags, pipeline->layout,
|
||||
subgroup_size, ballot_bit_size);
|
||||
pipeline_key);
|
||||
|
||||
/* We don't want to alter meta shaders IR directly so clone it
|
||||
* first.
|
||||
|
Reference in New Issue
Block a user