[Mesa-dev] [PATCH] ir_to_mesa: Handle shadow compare w/projection and LOD bias correctly
Ian Romanick
idr at freedesktop.org
Mon Apr 4 14:10:23 PDT 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/04/2011 02:05 PM, Brian Paul wrote:
> On 04/04/2011 02:40 PM, Ian Romanick wrote:
>> From: Ian Romanick<ian.d.romanick at intel.com>
>>
>> The code would previously handle the projection, then swizzle the
>> shadow comparitor into place. However, when the projection is done
>> "by hand," as in the TXB case, the unprojected shadow comparitor would
>> over-write the projected shadow comparitor.
>>
>> Shadow comparison with projection and LOD is an extremely rare case in
>> real application code, so it shouldn't matter that we don't handle
>> that case with the greatest efficiency.
>
> Looks good. Just minor comments...
>
>
>> Cc: Eric Anholt<eric at anholt.net>
>> Cc: Brian Paul<brianp at vmware.com>
>> References: https://bugs.freedesktop.org/show_bug.cgi?id=32395
>> ---
>> src/mesa/program/ir_to_mesa.cpp | 28 ++++++++++++++++++++++++++--
>> 1 files changed, 26 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/mesa/program/ir_to_mesa.cpp
>> b/src/mesa/program/ir_to_mesa.cpp
>> index bf2513d..677d330 100644
>> --- a/src/mesa/program/ir_to_mesa.cpp
>> +++ b/src/mesa/program/ir_to_mesa.cpp
>> @@ -2084,15 +2084,39 @@ ir_to_mesa_visitor::visit(ir_texture *ir)
>> coord_dst.writemask = WRITEMASK_W;
>> ir_to_mesa_emit_op1(ir, OPCODE_RCP, coord_dst, projector);
>>
>> + /* In the case where we have to project the coorindates "by hand,"
>
> coordinates
I've been having a lot of trouble with typos lately. Thanks for the catch.
>> + * the shadow comparison value must also be projected.
>
> maybe replace "shadow comparison" with "coordinate distance" to make it
> clear that we're referring to the texcoord/distance value and not the
> sampled value.
That's also a typo. It should have been "shadow comparitor" to match
the names of fields in the IR.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAk2aM78ACgkQX1gOwKyEAw98ZgCbBBSZdbhT8H2XlNryW+hRFtOg
Ok8An2RAY29MkOwM/ORSDLw+L+GHKcFg
=Aeoe
-----END PGP SIGNATURE-----
More information about the mesa-dev
mailing list