{
nir_shader *nir;
const nir_shader_compiler_options *nir_options = &v3dv_nir_options;
+ gl_shader_stage gl_stage = broadcom_shader_stage_to_gl(stage->stage);
if (V3D_DBG(DUMP_SPIRV) && stage->module->nir == NULL)
* call it again here.
*/
VkResult result = vk_shader_module_to_nir(&device->vk, stage->module,
- broadcom_shader_stage_to_gl(stage->stage),
+ gl_stage,
stage->entrypoint,
stage->spec_info,
&default_spirv_options,
NULL, &nir);
if (result != VK_SUCCESS)
return NULL;
- assert(nir->info.stage == broadcom_shader_stage_to_gl(stage->stage));
+ assert(nir->info.stage == gl_stage);
if (V3D_DBG(SHADERDB) && stage->module->nir == NULL) {
char sha1buf[41];
nir->info.name = ralloc_strdup(nir, sha1buf);
}
- if (V3D_DBG(NIR) ||
- v3d_debug_flag_for_shader_stage(broadcom_shader_stage_to_gl(stage->stage))) {
+ if (V3D_DBG(NIR) || v3d_debug_flag_for_shader_stage(gl_stage)) {
fprintf(stderr, "NIR after vk_shader_module_to_nir: %s prog %d NIR:\n",
broadcom_shader_stage_name(stage->stage),
stage->program_id);
struct v3dv_pipeline *pipeline = p_stage->pipeline;
struct v3dv_physical_device *physical_device = pipeline->device->pdevice;
const struct v3d_compiler *compiler = physical_device->compiler;
+ gl_shader_stage gl_stage = broadcom_shader_stage_to_gl(p_stage->stage);
- if (V3D_DBG(NIR) ||
- v3d_debug_flag_for_shader_stage(broadcom_shader_stage_to_gl(p_stage->stage))) {
+ if (V3D_DBG(NIR) || v3d_debug_flag_for_shader_stage(gl_stage)) {
fprintf(stderr, "Just before v3d_compile: %s prog %d NIR:\n",
broadcom_shader_stage_name(p_stage->stage),
p_stage->program_id);
uint64_t *qpu_insts;
uint32_t qpu_insts_size;
struct v3d_prog_data *prog_data;
- uint32_t prog_data_size =
- v3d_prog_data_size(broadcom_shader_stage_to_gl(p_stage->stage));
+ uint32_t prog_data_size = v3d_prog_data_size(gl_stage);
qpu_insts = v3d_compile(compiler,
key, &prog_data,