mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
anv: merge null surface state packing with previous attachments
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39982>
This commit is contained in:
parent
d1eed2239d
commit
dc79d6b13a
1 changed files with 13 additions and 20 deletions
|
|
@ -6413,6 +6413,14 @@ void genX(CmdBeginRendering)(
|
|||
}
|
||||
}
|
||||
|
||||
anv_cmd_graphic_state_update_has_uint_rt(gfx);
|
||||
|
||||
/* Finally, now that we know the right size, set up the null surface */
|
||||
assert(util_bitcount(gfx->samples) <= 1);
|
||||
isl_null_fill_state(&cmd_buffer->device->isl_dev,
|
||||
gfx->null_surface_state.map,
|
||||
.size = fb_size);
|
||||
|
||||
/* Do fast clearing */
|
||||
for (uint32_t i = 0; i < gfx->color_att_count; i++) {
|
||||
struct anv_attachment *att = &gfx->color_att[i];
|
||||
|
|
@ -6455,8 +6463,12 @@ void genX(CmdBeginRendering)(
|
|||
/* Fill surfaces, load clear colors and do slow clears */
|
||||
for (uint32_t i = 0; i < gfx->color_att_count; i++) {
|
||||
struct anv_attachment *att = &gfx->color_att[i];
|
||||
if (att->iview == NULL)
|
||||
if (att->iview == NULL) {
|
||||
isl_null_fill_state(&cmd_buffer->device->isl_dev,
|
||||
att->surface_state.state.map,
|
||||
.size = fb_size);
|
||||
continue;
|
||||
}
|
||||
|
||||
struct isl_view isl_view = att->iview->planes[0].isl;
|
||||
if (pRenderingInfo->viewMask) {
|
||||
|
|
@ -6517,25 +6529,6 @@ void genX(CmdBeginRendering)(
|
|||
}
|
||||
}
|
||||
|
||||
anv_cmd_graphic_state_update_has_uint_rt(gfx);
|
||||
|
||||
/* Finally, now that we know the right size, set up the null surface */
|
||||
assert(util_bitcount(gfx->samples) <= 1);
|
||||
isl_null_fill_state(&cmd_buffer->device->isl_dev,
|
||||
gfx->null_surface_state.map,
|
||||
.size = fb_size);
|
||||
|
||||
for (uint32_t i = 0; i < gfx->color_att_count; i++) {
|
||||
struct anv_attachment *att = &gfx->color_att[i];
|
||||
|
||||
if (pRenderingInfo->pColorAttachments[i].imageView != VK_NULL_HANDLE)
|
||||
continue;
|
||||
|
||||
isl_null_fill_state(&cmd_buffer->device->isl_dev,
|
||||
att->surface_state.state.map,
|
||||
.size = fb_size);
|
||||
}
|
||||
|
||||
/****** We can now start emitting code to begin the render pass ******/
|
||||
|
||||
gfx->dirty |= ANV_CMD_DIRTY_RENDER_TARGETS;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue