mirror of https://gitlab.freedesktop.org/mesa/mesa
v3dv/meta_clear: use v3dv_renderpass used as parameter
emit_subpass_color_clear_rects and emit_subpass_ds_clear_rects is receiving a v3dv_render_pass parameter pass, but then using cmd_buffer->state.pass to access the current pass. All calls to those methods are already initializing that parameter to that value. This commit just uses the parameter. An alternative would be to remove one of the parameters of the function call. I find this option slightly more readable. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29218>
This commit is contained in:
parent
07f3c37b9a
commit
b2282e3a57
|
@ -1015,11 +1015,10 @@ emit_subpass_color_clear_rects(struct v3dv_cmd_buffer *cmd_buffer,
|
|||
return;
|
||||
|
||||
/* Obtain a pipeline for this clear */
|
||||
assert(attachment_idx < cmd_buffer->state.pass->attachment_count);
|
||||
const VkFormat format =
|
||||
cmd_buffer->state.pass->attachments[attachment_idx].desc.format;
|
||||
assert(attachment_idx < pass->attachment_count);
|
||||
const VkFormat format = pass->attachments[attachment_idx].desc.format;
|
||||
const VkSampleCountFlagBits samples =
|
||||
cmd_buffer->state.pass->attachments[attachment_idx].desc.samples;
|
||||
pass->attachments[attachment_idx].desc.samples;
|
||||
const uint32_t components = VK_COLOR_COMPONENT_R_BIT |
|
||||
VK_COLOR_COMPONENT_G_BIT |
|
||||
VK_COLOR_COMPONENT_B_BIT |
|
||||
|
@ -1116,7 +1115,7 @@ emit_subpass_ds_clear_rects(struct v3dv_cmd_buffer *cmd_buffer,
|
|||
return;
|
||||
|
||||
/* Obtain a pipeline for this clear */
|
||||
assert(attachment_idx < cmd_buffer->state.pass->attachment_count);
|
||||
assert(attachment_idx < pass->attachment_count);
|
||||
struct v3dv_meta_depth_clear_pipeline *pipeline = NULL;
|
||||
|
||||
VkResult result = get_depth_clear_pipeline(cmd_buffer->device,
|
||||
|
|
Loading…
Reference in New Issue