mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 05:00:09 +01:00
lavapipe: store compiler options to physical device
this minimizes noise in gallium trace Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18867>
This commit is contained in:
parent
d1acd88c14
commit
ea429b90b7
3 changed files with 4 additions and 2 deletions
|
|
@ -240,6 +240,8 @@ lvp_physical_device_init(struct lvp_physical_device *device,
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -364,7 +364,6 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline,
|
|||
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;
|
||||
|
||||
|
|
@ -420,7 +419,7 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline,
|
|||
};
|
||||
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ struct lvp_physical_device {
|
|||
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue