[Mesa-dev] [PATCH] i965/blorp: Use the correct ISL format for combined depth/stencil
Ilia Mirkin
imirkin at alum.mit.edu
Mon Jan 23 20:04:29 UTC 2017
On Mon, Jan 23, 2017 at 2:58 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> On Mon, Jan 23, 2017 at 11:48 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>>
>> On Mon, Jan 23, 2017 at 2:42 PM, Jason Ekstrand <jason at jlekstrand.net>
>> wrote:
>> > In brw_blorp_copyteximage, we use the format from the render buffer.
>> > This could be a combined depth/stencil format. In this case, we handle
>> > stencil properly but we give blorp the wrong ISL format. Specifically,
>> > we would give blorp ISL_FORMAT_R32G32B32A32_FLOAT which is the wrong
>> > size was causing GPU hangs.
>> >
>> > Fixes:
>> > GL45-CTS.gtf30.GL3Tests.packed_depth_stencil.packed_depth_stencil_copyteximage
>> >
>> > Cc: "13.0 17.0" <mesa-stable at lists.freedesktop.org>
>> > Cc: Kenneth Graunke <kenneth at whitecape.org>
>> > ---
>> > src/mesa/drivers/dri/i965/brw_blorp.c | 2 ++
>> > 1 file changed, 2 insertions(+)
>> >
>> > diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c
>> > b/src/mesa/drivers/dri/i965/brw_blorp.c
>> > index d79f529..3a7cf84 100644
>> > --- a/src/mesa/drivers/dri/i965/brw_blorp.c
>> > +++ b/src/mesa/drivers/dri/i965/brw_blorp.c
>> > @@ -284,8 +284,10 @@ brw_blorp_to_isl_format(struct brw_context *brw,
>> > mesa_format format,
>> > case MESA_FORMAT_S_UINT8:
>> > return ISL_FORMAT_R8_UINT;
>> > case MESA_FORMAT_Z24_UNORM_X8_UINT:
>> > + case MESA_FORMAT_Z24_UNORM_S8_UINT:
>> > return ISL_FORMAT_R24_UNORM_X8_TYPELESS;
>> > case MESA_FORMAT_Z_FLOAT32:
>> > + case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
>>
>> Are you sure you don't want ISL_FORMAT_R32_FLOAT_X8X24_TYPELESS for
>> this one? (I don't have the larger context here, so just asking...)
>
>
> Yes, I'm sure. In theory, we could add that format to the list but I don't
> think we ever see it. The only reason why we see the two I'm adding is
> because brw_blorp_copytexsubimage pulls the format from the renderbuffer
> rather than the miptree so we see the combined format and want to pull the
> corresponding depth format.
Oh, and your depth/stencil buffers aren't packed (at least in this
case), so the underlying DB format is R32F. Forgot about that. Thanks
for explaining!
-ilia
More information about the mesa-dev
mailing list