[Mesa-dev] [PATCH 1/2] mesa, glsl_to_tgsi: Add new gl_context::NativeIntegers flag.

Eric Anholt eric at anholt.net
Mon Aug 15 15:38:58 PDT 2011


On Mon, 15 Aug 2011 15:02:31 -0700, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Previously, native integer support was based on whether the driver
> advertised GLSL 1.30 or not.  However, drivers that natively support
> integers may wish to do so for older GLSL versions as well.  Adding this
> new opt-in flag allows them to do so.
> 
> Currently disabled by default on all drivers, which was the existing
> behavior (no drivers currently implement GLSL 1.30).
> 
> Fixes piglit tests on i965 with INTEL_GLSL_VERSION=130 set:
> - spec/glsl-1.10/fs-uniform-int-110.shader_test
> - spec/glsl-1.30/fs-uniform-int-130.shader_test
> (it was doubly converting the data)
> 
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index aef23e7..72ba920 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -295,6 +295,7 @@ public:
>     bool indirect_addr_consts;
>     
>     int glsl_version;
> +   int native_integers;

Surely you mean "bool"?

Other than that,

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110815/3cb16028/attachment.pgp>


More information about the mesa-dev mailing list