projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
771c0f0
)
radv: Reserve space for updating DCC metadata.
author
Bas Nieuwenhuizen
<bas@basnieuwenhuizen.nl>
Sat, 11 Mar 2023 17:43:45 +0000
(18:43 +0100)
committer
Marge Bot
<emma+marge@anholt.net>
Wed, 12 Apr 2023 20:31:47 +0000
(20:31 +0000)
Fixes:
9ee67467c9e
("radv: predicate cmask eliminate when using DCC.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22392>
src/amd/vulkan/radv_cmd_buffer.c
patch
|
blob
|
history
diff --git
a/src/amd/vulkan/radv_cmd_buffer.c
b/src/amd/vulkan/radv_cmd_buffer.c
index
c1e9fb4
..
2888606
100644
(file)
--- a/
src/amd/vulkan/radv_cmd_buffer.c
+++ b/
src/amd/vulkan/radv_cmd_buffer.c
@@
-3169,6
+3169,9
@@
radv_update_dcc_metadata(struct radv_cmd_buffer *cmd_buffer, struct radv_image *
assert(radv_dcc_enabled(image, range->baseMipLevel));
+ ASSERTED unsigned cdw_max =
+ radeon_check_space(cmd_buffer->device->ws, cmd_buffer->cs, 4 + count);
+
radeon_emit(cmd_buffer->cs, PKT3(PKT3_WRITE_DATA, 2 + count, 0));
radeon_emit(cmd_buffer->cs,
S_370_DST_SEL(V_370_MEM) | S_370_WR_CONFIRM(1) | S_370_ENGINE_SEL(V_370_PFP));
@@
-3179,6
+3182,8
@@
radv_update_dcc_metadata(struct radv_cmd_buffer *cmd_buffer, struct radv_image *
radeon_emit(cmd_buffer->cs, pred_val);
radeon_emit(cmd_buffer->cs, pred_val >> 32);
}
+
+ assert(cmd_buffer->cs->cdw <= cdw_max);
}
/**