From bb430ced7fb2aa26007637a0907d886716e8ddd6 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 26 Mar 2012 14:04:48 -0700 Subject: glsl: Add texelFetch(*samplerBuffer) entrypoints to GLSL 1.40. Fix texelFetch(sampler2DRect) and textureSize(samplerBuffer) generation to not reference a LOD at the same time because it's easier than not fixing it. Reviewed-by: Kenneth Graunke --- src/glsl/builtins/profiles/140.frag | 4 ++++ src/glsl/builtins/profiles/140.vert | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'src/glsl/builtins/profiles') diff --git a/src/glsl/builtins/profiles/140.frag b/src/glsl/builtins/profiles/140.frag index da284735cce..b534827c994 100644 --- a/src/glsl/builtins/profiles/140.frag +++ b/src/glsl/builtins/profiles/140.frag @@ -714,6 +714,10 @@ uvec4 texelFetch(usampler1DArray sampler, ivec2 P, int lod); ivec4 texelFetch(isampler2DArray sampler, ivec3 P, int lod); uvec4 texelFetch(usampler2DArray sampler, ivec3 P, int lod); + vec4 texelFetch( samplerBuffer sampler, int P); +ivec4 texelFetch(isamplerBuffer sampler, int P); +uvec4 texelFetch(usamplerBuffer sampler, int P); + /* texelFetchOffset */ vec4 texelFetchOffset( sampler1D sampler, int P, int lod, int offset); ivec4 texelFetchOffset(isampler1D sampler, int P, int lod, int offset); diff --git a/src/glsl/builtins/profiles/140.vert b/src/glsl/builtins/profiles/140.vert index bfef4ed1a41..7aa92402c38 100644 --- a/src/glsl/builtins/profiles/140.vert +++ b/src/glsl/builtins/profiles/140.vert @@ -635,6 +635,10 @@ uvec4 texelFetch(usampler1DArray sampler, ivec2 P, int lod); ivec4 texelFetch(isampler2DArray sampler, ivec3 P, int lod); uvec4 texelFetch(usampler2DArray sampler, ivec3 P, int lod); + vec4 texelFetch( samplerBuffer sampler, int P); +ivec4 texelFetch(isamplerBuffer sampler, int P); +uvec4 texelFetch(usamplerBuffer sampler, int P); + /* texelFetchOffset */ vec4 texelFetchOffset( sampler1D sampler, int P, int lod, int offset); ivec4 texelFetchOffset(isampler1D sampler, int P, int lod, int offset); -- cgit v1.2.3