device->pscreen = pipe_loader_create_screen_vk(device->pld, true);
if (!device->pscreen)
return vk_error(instance, VK_ERROR_OUT_OF_HOST_MEMORY);
+ for (unsigned i = 0; i < ARRAY_SIZE(device->drv_options); i++)
+ device->drv_options[i] = device->pscreen->get_compiler_options(device->pscreen, PIPE_SHADER_IR_NIR, i);
device->sync_timeline_type = vk_sync_timeline_get_type(&lvp_pipe_sync_type);
device->sync_types[0] = &lvp_pipe_sync_type;
struct lvp_device *pdevice = pipeline->device;
gl_shader_stage stage = vk_to_mesa_shader_stage(sinfo->stage);
assert(stage <= MESA_SHADER_COMPUTE && stage != MESA_SHADER_NONE);
- const nir_shader_compiler_options *drv_options = pdevice->pscreen->get_compiler_options(pipeline->device->pscreen, PIPE_SHADER_IR_NIR, (enum pipe_shader_type)stage);
VkResult result;
nir_shader *nir;
};
result = vk_pipeline_shader_stage_to_nir(&pdevice->vk, sinfo,
- &spirv_options, drv_options,
+ &spirv_options, pdevice->physical_device->drv_options[stage],
NULL, &nir);
if (result != VK_SUCCESS)
return result;
struct pipe_loader_device *pld;
struct pipe_screen *pscreen;
+ const nir_shader_compiler_options *drv_options[MESA_SHADER_STAGES];
uint32_t max_images;
struct vk_sync_timeline_type sync_timeline_type;