mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
anv: fixup 3DSTATE_COARSE_PIXEL emission
We had 2 bits for 3DSTATE_CPS/3DSTATE_COARSE_PIXEL and during the
rework I merged them since we only need one (3DSTATE_CPS is pre-Xe3,
3DSTATE_COARSE_PIXEL Xe3+).
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 44aaf88425 ("anv: rework gfx state emission (again)")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13923
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37472>
This commit is contained in:
parent
c334ade0c2
commit
ade4952d3c
3 changed files with 11 additions and 20 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue