mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 18:50:31 +01:00
radv: Support DCC without DCC/FCE predicates.
Imported images can't have this as part of the associated memory. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9998>
This commit is contained in:
parent
b61efd53b4
commit
dece117fdc
2 changed files with 12 additions and 5 deletions
|
|
@ -2116,13 +2116,14 @@ radv_update_fce_metadata(struct radv_cmd_buffer *cmd_buffer,
|
|||
struct radv_image *image,
|
||||
const VkImageSubresourceRange *range, bool value)
|
||||
{
|
||||
if (!image->fce_pred_offset)
|
||||
return;
|
||||
|
||||
uint64_t pred_val = value;
|
||||
uint64_t va = radv_image_get_fce_pred_va(image, range->baseMipLevel);
|
||||
uint32_t level_count = radv_get_levelCount(image, range);
|
||||
uint32_t count = 2 * level_count;
|
||||
|
||||
assert(image->fce_pred_offset != 0);
|
||||
|
||||
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) |
|
||||
|
|
@ -2144,6 +2145,9 @@ radv_update_dcc_metadata(struct radv_cmd_buffer *cmd_buffer,
|
|||
struct radv_image *image,
|
||||
const VkImageSubresourceRange *range, bool value)
|
||||
{
|
||||
if (image->dcc_pred_offset == 0)
|
||||
return;
|
||||
|
||||
uint64_t pred_val = value;
|
||||
uint64_t va = radv_image_get_dcc_pred_va(image, range->baseMipLevel);
|
||||
uint32_t level_count = radv_get_levelCount(image, range);
|
||||
|
|
@ -2151,9 +2155,6 @@ radv_update_dcc_metadata(struct radv_cmd_buffer *cmd_buffer,
|
|||
|
||||
assert(radv_dcc_enabled(image, range->baseMipLevel));
|
||||
|
||||
if (image->dcc_pred_offset == 0)
|
||||
return;
|
||||
|
||||
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) |
|
||||
|
|
|
|||
|
|
@ -2043,6 +2043,8 @@ static inline uint64_t
|
|||
radv_image_get_fce_pred_va(const struct radv_image *image,
|
||||
uint32_t base_level)
|
||||
{
|
||||
assert(image->fce_pred_offset != 0);
|
||||
|
||||
uint64_t va = radv_buffer_get_va(image->bo);
|
||||
va += image->offset + image->fce_pred_offset + base_level * 8;
|
||||
return va;
|
||||
|
|
@ -2052,6 +2054,8 @@ static inline uint64_t
|
|||
radv_image_get_dcc_pred_va(const struct radv_image *image,
|
||||
uint32_t base_level)
|
||||
{
|
||||
assert(image->dcc_pred_offset != 0);
|
||||
|
||||
uint64_t va = radv_buffer_get_va(image->bo);
|
||||
va += image->offset + image->dcc_pred_offset + base_level * 8;
|
||||
return va;
|
||||
|
|
@ -2061,6 +2065,8 @@ static inline uint64_t
|
|||
radv_get_tc_compat_zrange_va(const struct radv_image *image,
|
||||
uint32_t base_level)
|
||||
{
|
||||
assert(image->tc_compat_zrange_offset != 0);
|
||||
|
||||
uint64_t va = radv_buffer_get_va(image->bo);
|
||||
va += image->offset + image->tc_compat_zrange_offset + base_level * 4;
|
||||
return va;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue