On 06/27/2017 10:53 AM, Kenneth Graunke wrote:
> On Monday, June 26, 2017 4:22:45 PM PDT Ian Romanick wrote:
>> From: Ian Romanick <ian.d.roman...@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.

I looked through the blorp code, and I didn't see any way for it to not
return success for a color blit.  The assertion also didn't trigger on
the CI, but that may just mean we have a testing hole.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to