mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 17:10:26 +01:00
nvk: Set color/Z compression based on nil_image::compressed
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 603389f7a3)
This commit is contained in:
parent
395cd831b3
commit
b7f177ceae
2 changed files with 8 additions and 2 deletions
|
|
@ -1554,7 +1554,7 @@
|
|||
"description": "nvk: Set color/Z compression based on nil_image::compressed",
|
||||
"nominated": false,
|
||||
"nomination_type": 3,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -641,7 +641,7 @@ nvk_CmdBeginRendering(VkCommandBuffer commandBuffer,
|
|||
|
||||
/* Always emit at least one color attachment, even if it's just a dummy. */
|
||||
uint32_t color_att_count = MAX2(1, render->color_att_count);
|
||||
struct nv_push *p = nvk_cmd_buffer_push(cmd, color_att_count * 10 + 27);
|
||||
struct nv_push *p = nvk_cmd_buffer_push(cmd, color_att_count * 12 + 29);
|
||||
|
||||
P_IMMD(p, NV9097, SET_MME_SHADOW_SCRATCH(NVK_MME_SCRATCH_VIEW_MASK),
|
||||
render->view_mask);
|
||||
|
|
@ -752,6 +752,8 @@ nvk_CmdBeginRendering(VkCommandBuffer commandBuffer,
|
|||
P_NV9097_SET_COLOR_TARGET_ARRAY_PITCH(p, i, 0);
|
||||
P_NV9097_SET_COLOR_TARGET_LAYER(p, i, 0);
|
||||
}
|
||||
|
||||
P_IMMD(p, NV9097, SET_COLOR_COMPRESSION(i), nil_image->compressed);
|
||||
} else {
|
||||
P_MTHD(p, NV9097, SET_COLOR_TARGET_A(i));
|
||||
P_NV9097_SET_COLOR_TARGET_A(p, i, 0);
|
||||
|
|
@ -765,6 +767,8 @@ nvk_CmdBeginRendering(VkCommandBuffer commandBuffer,
|
|||
P_NV9097_SET_COLOR_TARGET_THIRD_DIMENSION(p, i, layer_count);
|
||||
P_NV9097_SET_COLOR_TARGET_ARRAY_PITCH(p, i, 0);
|
||||
P_NV9097_SET_COLOR_TARGET_LAYER(p, i, 0);
|
||||
|
||||
P_IMMD(p, NV9097, SET_COLOR_COMPRESSION(i), ENABLE_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -850,6 +854,8 @@ nvk_CmdBeginRendering(VkCommandBuffer commandBuffer,
|
|||
|
||||
P_IMMD(p, NV9097, SET_ZT_LAYER, base_array_layer);
|
||||
|
||||
P_IMMD(p, NV9097, SET_Z_COMPRESSION, nil_image.compressed);
|
||||
|
||||
if (nvk_cmd_buffer_3d_cls(cmd) >= MAXWELL_B) {
|
||||
P_IMMD(p, NVC597, SET_ZT_SPARSE, {
|
||||
.enable = ENABLE_FALSE,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue