[Mesa-dev] [PATCH 12/12] i965: Assert that blorp always handles color blits
Kenneth Graunke
kenneth at whitecape.org
Tue Jun 27 17:53:39 UTC 2017
On Monday, June 26, 2017 4:22:45 PM PDT Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> ---
> src/mesa/drivers/dri/i965/brw_blorp.c | 2 ++
> src/mesa/drivers/dri/i965/intel_fbo.c | 3 +++
> 2 files changed, 5 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
> index 92d1d2a..9c9b859 100644
> --- a/src/mesa/drivers/dri/i965/brw_blorp.c
> +++ b/src/mesa/drivers/dri/i965/brw_blorp.c
> @@ -707,6 +707,8 @@ brw_blorp_framebuffer(struct brw_context *brw,
> }
> }
>
> + /* try_blorp_blit should always be successful for color blits. */
> + assert(!(mask & GL_COLOR_BUFFER_BIT));
> return mask;
> }
>
> diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
> index caf182c..f0f87bb 100644
> --- a/src/mesa/drivers/dri/i965/intel_fbo.c
> +++ b/src/mesa/drivers/dri/i965/intel_fbo.c
> @@ -932,6 +932,9 @@ intel_blit_framebuffer(struct gl_context *ctx,
> if (mask == 0x0)
> return;
>
> + /* brw_blorp_framebuffer should always be successful for color blits. */
> + assert(!(mask & GL_COLOR_BUFFER_BIT));
> +
> mask = _mesa_meta_BlitFramebuffer(ctx, readFb, drawFb,
> srcX0, srcY0, srcX1, srcY1,
> dstX0, dstY0, dstX1, dstY1,
>
Is that true? I suppose scaling and filtering isn't a problem, because
that will apply to the source formats, which should all be texturable.
Format conversion ought to work as long as the destination is renderable.
If all non-renderable formats result in an incomplete FBO - which I imagine
they do - then this ought to work.
I know Jason had code to support RGB9E5 and other non-renderable formats,
with shader fixups.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170627/91da837e/attachment.sig>
More information about the mesa-dev
mailing list