v3dv: remove sRGB blending workaround
This reverts commits4c15131b1dand1cf36797bf. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11377>
This commit is contained in:
@@ -4354,9 +4354,8 @@ emit_index_buffer(struct v3dv_cmd_buffer *cmd_buffer)
|
||||
static void
|
||||
cmd_buffer_emit_pre_draw(struct v3dv_cmd_buffer *cmd_buffer)
|
||||
{
|
||||
struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
|
||||
assert(pipeline);
|
||||
assert(!(pipeline->active_stages & VK_SHADER_STAGE_COMPUTE_BIT));
|
||||
assert(cmd_buffer->state.gfx.pipeline);
|
||||
assert(!(cmd_buffer->state.gfx.pipeline->active_stages & VK_SHADER_STAGE_COMPUTE_BIT));
|
||||
|
||||
/* If we emitted a pipeline barrier right before this draw we won't have
|
||||
* an active job. In that case, create a new job continuing the current
|
||||
@@ -4370,25 +4369,6 @@ cmd_buffer_emit_pre_draw(struct v3dv_cmd_buffer *cmd_buffer)
|
||||
/* Restart single sample job for MSAA pipeline if needed */
|
||||
cmd_buffer_restart_job_for_msaa_if_needed(cmd_buffer);
|
||||
|
||||
/* Enable always flush if we are blending to sRGB render targets. This
|
||||
* fixes test failures in:
|
||||
* dEQP-VK.pipeline.blend.format.r8g8b8a8_srgb.*
|
||||
*
|
||||
* FIXME: not sure why we need this. The tile buffer is always linear, with
|
||||
* conversion from/to sRGB happening on tile load/store operations. This
|
||||
* means that when we enable flushing the only difference is that we convert
|
||||
* to sRGB on the store after each draw call and we convert from sRGB on the
|
||||
* load before each draw call, but the blend happens in linear format in the
|
||||
* tile buffer anyway, which is the same scenario as if we didn't flush.
|
||||
*/
|
||||
assert(pipeline->subpass);
|
||||
assert(cmd_buffer->state.job);
|
||||
if (pipeline->subpass->has_srgb_rt && pipeline->blend.enables) {
|
||||
cmd_buffer->state.job->always_flush = true;
|
||||
perf_debug("flushing draw calls for subpass %d because bound pipeline "
|
||||
"uses sRGB blending\n", cmd_buffer->state.subpass_idx);
|
||||
}
|
||||
|
||||
/* If the job is configured to flush on every draw call we need to create
|
||||
* a new job now.
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
*/
|
||||
|
||||
#include "v3dv_private.h"
|
||||
#include "vk_format_info.h"
|
||||
|
||||
static uint32_t
|
||||
num_subpass_attachments(const VkSubpassDescription *desc)
|
||||
@@ -175,16 +174,10 @@ v3dv_CreateRenderPass(VkDevice _device,
|
||||
p += desc->colorAttachmentCount;
|
||||
|
||||
for (uint32_t j = 0; j < desc->colorAttachmentCount; j++) {
|
||||
const uint32_t attachment_idx =
|
||||
desc->pColorAttachments[j].attachment;
|
||||
subpass->color_attachments[j] = (struct v3dv_subpass_attachment) {
|
||||
.attachment = attachment_idx,
|
||||
.attachment = desc->pColorAttachments[j].attachment,
|
||||
.layout = desc->pColorAttachments[j].layout,
|
||||
};
|
||||
if (attachment_idx != VK_ATTACHMENT_UNUSED) {
|
||||
VkFormat format = pass->attachments[attachment_idx].desc.format;
|
||||
subpass->has_srgb_rt |= vk_format_is_srgb(format);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -585,8 +585,6 @@ struct v3dv_subpass {
|
||||
|
||||
struct v3dv_subpass_attachment ds_attachment;
|
||||
|
||||
bool has_srgb_rt;
|
||||
|
||||
/* If we need to emit the clear of the depth/stencil attachment using a
|
||||
* a draw call instead of using the TLB (GFXH-1461).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user