radv: add set_loc_shader_ptr() helper
[mesa.git] / src / amd / vulkan / radv_shader_info.c
index aa06efc9dc70eb08dc2b9b48db2b6ec70db0f852..b45b4c0c95b723be30fe5341b97748db28aa1868 100644 (file)
@@ -134,6 +134,12 @@ gather_intrinsic_store_var_info(const nir_shader *nir,
                                        instr->const_index[0] << comp;
                        }
                        break;
+               case MESA_SHADER_GEOMETRY:
+                       for (unsigned i = 0; i < attrib_count; i++) {
+                               info->gs.output_usage_mask[idx + i + const_offset] |=
+                                       instr->const_index[0] << comp;
+                       }
+                       break;
                case MESA_SHADER_TESS_EVAL:
                        for (unsigned i = 0; i < attrib_count; i++) {
                                info->tes.output_usage_mask[idx + i + const_offset] |=
@@ -424,7 +430,7 @@ radv_nir_shader_info_pass(const struct nir_shader *nir,
        struct nir_function *func =
                (struct nir_function *)exec_list_get_head_const(&nir->functions);
 
-       if (options->layout->dynamic_offset_count)
+       if (options->layout && options->layout->dynamic_offset_count)
                info->loads_push_constants = true;
 
        nir_foreach_variable(variable, &nir->inputs)