radv: fix enabling adjust_frag_coord_z and apply per-pipeline
Fossilize always enables all supported extensions, that means that adjust_frag_coord_z would always be enabled on RDNA2, even if the application doesn't enable it. The pipeline key would then be different and precompilation wouldn't work. Move this per-pipeline since we can know if VRS will be used. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15444>
This commit is contained in:

committed by
Marge Bot

parent
9da14a2119
commit
2591a52560
@@ -2940,6 +2940,7 @@ radv_generate_graphics_pipeline_key(const struct radv_pipeline *pipeline,
|
||||
const VkGraphicsPipelineCreateInfo *pCreateInfo,
|
||||
const struct radv_blend_state *blend)
|
||||
{
|
||||
struct radv_device *device = pipeline->device;
|
||||
const VkPipelineRenderingCreateInfo *render_create_info =
|
||||
vk_find_struct_const(pCreateInfo->pNext, PIPELINE_RENDERING_CREATE_INFO);
|
||||
bool uses_dynamic_stride = false;
|
||||
@@ -3083,7 +3084,12 @@ radv_generate_graphics_pipeline_key(const struct radv_pipeline *pipeline,
|
||||
key.invariant_geom = true;
|
||||
|
||||
key.use_ngg = pipeline->device->physical_device->use_ngg;
|
||||
key.adjust_frag_coord_z = pipeline->device->adjust_frag_coord_z;
|
||||
|
||||
if ((radv_is_vrs_enabled(pipeline, pCreateInfo) || device->force_vrs_enabled) &&
|
||||
(device->physical_device->rad_info.family == CHIP_SIENNA_CICHLID ||
|
||||
device->physical_device->rad_info.family == CHIP_NAVY_FLOUNDER ||
|
||||
device->physical_device->rad_info.family == CHIP_VANGOGH))
|
||||
key.adjust_frag_coord_z = true;
|
||||
|
||||
return key;
|
||||
}
|
||||
|
Reference in New Issue
Block a user