anv/cmd_buffer: Use the proper depth input attachment surface state
Commit 2852efcda4
moved the location of
the depth input attachment surface state from the render pass to the
image view, but failed to update the surface state location used when
emitting the binding table. Fix this by loading the surface state from
the correct location.
Fixes:
dEQP-VK.renderpass.formats.d16_unorm.input.*
dEQP-VK.renderpass.formats.d24_unorm_s8_uint.input.*
dEQP-VK.renderpass.formats.d32_sfloat.input.*
dEQP-VK.renderpass.formats.x8_d24_unorm_pack32.input.*
dEQP-VK.renderpass.attachment_allocation.input_output.93
dEQP-VK.renderpass.attachment_allocation.input_output.92
dEQP-VK.renderpass.attachment_allocation.input_output.82
dEQP-VK.renderpass.attachment_allocation.input_output.46
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
This commit is contained in:
@@ -1177,9 +1177,9 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
|
|||||||
|
|
||||||
case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT:
|
case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT:
|
||||||
assert(stage == MESA_SHADER_FRAGMENT);
|
assert(stage == MESA_SHADER_FRAGMENT);
|
||||||
if (desc->image_view->aspect_mask == VK_IMAGE_ASPECT_STENCIL_BIT) {
|
if (desc->image_view->aspect_mask != VK_IMAGE_ASPECT_COLOR_BIT) {
|
||||||
/* For stencil input attachments, we treat it like any old texture
|
/* For depth and stencil input attachments, we treat it like any
|
||||||
* that a user may have bound.
|
* old texture that a user may have bound.
|
||||||
*/
|
*/
|
||||||
surface_state = desc->image_view->sampler_surface_state;
|
surface_state = desc->image_view->sampler_surface_state;
|
||||||
assert(surface_state.alloc_size);
|
assert(surface_state.alloc_size);
|
||||||
@@ -1187,9 +1187,9 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
|
|||||||
desc->image_view->image->aux_usage,
|
desc->image_view->image->aux_usage,
|
||||||
surface_state);
|
surface_state);
|
||||||
} else {
|
} else {
|
||||||
/* For depth and color input attachments, we create the surface
|
/* For color input attachments, we create the surface state at
|
||||||
* state at vkBeginRenderPass time so that we can include aux
|
* vkBeginRenderPass time so that we can include aux and clear
|
||||||
* and clear color information.
|
* color information.
|
||||||
*/
|
*/
|
||||||
assert(binding->input_attachment_index < subpass->input_count);
|
assert(binding->input_attachment_index < subpass->input_count);
|
||||||
const unsigned subpass_att = binding->input_attachment_index;
|
const unsigned subpass_att = binding->input_attachment_index;
|
||||||
|
Reference in New Issue
Block a user