diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 00885daec5a..351719f261e 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -953,11 +953,7 @@ VkResult anv_CreateDevice( if (!device->vk.enabled_extensions.EXT_sample_locations) BITSET_CLEAR(device->gfx_dirty_state, ANV_GFX_STATE_SAMPLE_PATTERN); if (!device->vk.enabled_extensions.KHR_fragment_shading_rate) { - if (device->info->ver >= 30) { - BITSET_CLEAR(device->gfx_dirty_state, ANV_GFX_STATE_COARSE_PIXEL); - } else { - BITSET_CLEAR(device->gfx_dirty_state, ANV_GFX_STATE_CPS); - } + BITSET_CLEAR(device->gfx_dirty_state, ANV_GFX_STATE_CPS); } if (!device->vk.enabled_extensions.EXT_mesh_shader) { BITSET_CLEAR(device->gfx_dirty_state, ANV_GFX_STATE_SBE_MESH); diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 7906a528210..2f95c44e7e9 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1852,7 +1852,6 @@ enum anv_gfx_state_bits { ANV_GFX_STATE_BLEND_STATE, ANV_GFX_STATE_CLIP, ANV_GFX_STATE_CC_STATE, - ANV_GFX_STATE_COARSE_PIXEL, ANV_GFX_STATE_CPS, ANV_GFX_STATE_DEPTH_BOUNDS, ANV_GFX_STATE_INDEX_BUFFER, diff --git a/src/intel/vulkan/genX_gfx_state.c b/src/intel/vulkan/genX_gfx_state.c index e726012517e..01a45f4c1cd 100644 --- a/src/intel/vulkan/genX_gfx_state.c +++ b/src/intel/vulkan/genX_gfx_state.c @@ -1291,13 +1291,13 @@ update_cps(struct anv_gfx_dynamic_state *hw_state, const struct vk_dynamic_graphics_state *dyn) { #if GFX_VER >= 30 - SET(COARSE_PIXEL, coarse_pixel.CPSizeX, + SET(CPS, coarse_pixel.CPSizeX, get_cps_size(dyn->fsr.fragment_size.width)); - SET(COARSE_PIXEL, coarse_pixel.CPSizeY, + SET(CPS, coarse_pixel.CPSizeY, get_cps_size(dyn->fsr.fragment_size.height)); - SET(COARSE_PIXEL, coarse_pixel.CPSizeCombiner0Opcode, + SET(CPS, coarse_pixel.CPSizeCombiner0Opcode, vk_to_intel_shading_rate_combiner_op[dyn->fsr.combiner_ops[0]]); - SET(COARSE_PIXEL, coarse_pixel.CPSizeCombiner1Opcode, + SET(CPS, coarse_pixel.CPSizeCombiner1Opcode, vk_to_intel_shading_rate_combiner_op[dyn->fsr.combiner_ops[1]]); #elif GFX_VER >= 12 SET(CPS, cps.CoarsePixelShadingStateArrayPointer, @@ -2855,8 +2855,8 @@ cmd_buffer_repack_gfx_state(struct anv_gfx_dynamic_state *hw_state, } } -#if GFX_VER >= 30 if (IS_DIRTY(CPS)) { +#if GFX_VER >= 30 anv_gfx_pack(cps, GENX(3DSTATE_COARSE_PIXEL), coarse_pixel) { coarse_pixel.DisableCPSPointers = true; SET(coarse_pixel, coarse_pixel, CPSizeX); @@ -2864,22 +2864,18 @@ cmd_buffer_repack_gfx_state(struct anv_gfx_dynamic_state *hw_state, SET(coarse_pixel, coarse_pixel, CPSizeCombiner0Opcode); SET(coarse_pixel, coarse_pixel, CPSizeCombiner1Opcode); } - } -#else - if (IS_DIRTY(CPS)) { -#if GFX_VER == 11 +#elif GFX_VER >= 12 + anv_gfx_pack(cps, GENX(3DSTATE_CPS_POINTERS), cps) { + SET(cps, cps, CoarsePixelShadingStateArrayPointer); + } +#elif GFX_VER == 11 anv_gfx_pack(cps, GENX(3DSTATE_CPS), cps) { SET(cps, cps, CoarsePixelShadingMode); SET(cps, cps, MinCPSizeX); SET(cps, cps, MinCPSizeY); } -#elif GFX_VER >= 12 - anv_gfx_pack(cps, GENX(3DSTATE_CPS_POINTERS), cps) { - SET(cps, cps, CoarsePixelShadingStateArrayPointer); - } #endif } -#endif /* GFX_VER >= 30 */ if (IS_DIRTY(SF)) { anv_gfx_pack(sf, GENX(3DSTATE_SF), sf) {