Jordan Justen <[email protected]> writes:

> On Thu, May 30, 2013 at 3:47 PM, Eric Anholt <[email protected]> wrote:
>> We were copying the source stencil data onto the destination depth data.
>>
>> Fixes piglit copyteximage other than 1D_ARRAY.
>> ---
>>  src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 10 ++++++++--
>>  1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp 
>> b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
>> index c3ef054..67c40a7 100644
>> --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
>> +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
>> @@ -375,10 +375,16 @@ brw_blorp_copytexsubimage(struct intel_context *intel,
>>     if (_mesa_get_format_bits(dst_image->TexFormat, GL_STENCIL_BITS) > 0 &&
>>         src_rb != NULL) {
>>        src_irb = intel_renderbuffer(src_rb);
>> -      if (src_irb->mt != src_mt)
>
> Was this previous 'if' a mistake? I see the brw_blorp_blit_miptrees
> call was not indented previously, and it was separated by a line.

Good catch!  It wasn't a mistake -- if one was to copy a real packed
depth/stencil to packed depth/stencil, you wouldn't want to copy it
twice.  Bad indentation on my part in the previous code made me lose
track of what was going on.

>> +      src_mt = src_irb->mt;
>> +
>> +      if (src_mt->stencil_mt)
>> +         src_mt = src_mt->stencil_mt;
>
> else
>      src_mt = src_irb->mt;
> ?

The previous pattern is common, so I'll leave it.

Attachment: pgp5GqbBSC232.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to