[Mesa-dev] [PATCH] glsl: make sure that texture(bias) variants are only exposed in fs
Kenneth Graunke
kenneth at whitecape.org
Fri May 13 06:17:59 UTC 2016
On Friday, May 13, 2016 1:12:20 AM PDT Ilia Mirkin wrote:
> Many were already marked as fs_only, but not all. This fixes the
> remaining ir_txb entries.
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
> src/compiler/glsl/builtin_functions.cpp | 74 +++++++++++++++
+-----------------
> 1 file changed, 37 insertions(+), 37 deletions(-)
>
> diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/
builtin_functions.cpp
> index 25d914d..edd02bb 100644
> --- a/src/compiler/glsl/builtin_functions.cpp
> +++ b/src/compiler/glsl/builtin_functions.cpp
> @@ -1821,26 +1821,26 @@ builtin_builder::create_builtins()
>
> _texture(ir_tex, v130, glsl_type::float_type,
glsl_type::sampler2DRectShadow_type, glsl_type::vec4_type, TEX_PROJECT),
>
> - _texture(ir_txb, v130, glsl_type::vec4_type,
glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
> - _texture(ir_txb, v130, glsl_type::ivec4_type,
glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
> - _texture(ir_txb, v130, glsl_type::uvec4_type,
glsl_type::usampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
> - _texture(ir_txb, v130, glsl_type::vec4_type,
glsl_type::sampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
> - _texture(ir_txb, v130, glsl_type::ivec4_type,
glsl_type::isampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
> - _texture(ir_txb, v130, glsl_type::uvec4_type,
glsl_type::usampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::vec4_type,
glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::ivec4_type,
glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::uvec4_type,
glsl_type::usampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::vec4_type,
glsl_type::sampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::ivec4_type,
glsl_type::isampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::uvec4_type,
glsl_type::usampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
>
> - _texture(ir_txb, v130, glsl_type::vec4_type,
glsl_type::sampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
> - _texture(ir_txb, v130, glsl_type::ivec4_type,
glsl_type::isampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
> - _texture(ir_txb, v130, glsl_type::uvec4_type,
glsl_type::usampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
> - _texture(ir_txb, v130, glsl_type::vec4_type,
glsl_type::sampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
> - _texture(ir_txb, v130, glsl_type::ivec4_type,
glsl_type::isampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
> - _texture(ir_txb, v130, glsl_type::uvec4_type,
glsl_type::usampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::vec4_type,
glsl_type::sampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::ivec4_type,
glsl_type::isampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::uvec4_type,
glsl_type::usampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::vec4_type,
glsl_type::sampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::ivec4_type,
glsl_type::isampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::uvec4_type,
glsl_type::usampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
>
> - _texture(ir_txb, v130, glsl_type::vec4_type,
glsl_type::sampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
> - _texture(ir_txb, v130, glsl_type::ivec4_type,
glsl_type::isampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
> - _texture(ir_txb, v130, glsl_type::uvec4_type,
glsl_type::usampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::vec4_type,
glsl_type::sampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::ivec4_type,
glsl_type::isampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::uvec4_type,
glsl_type::usampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
>
> - _texture(ir_txb, v130, glsl_type::float_type,
glsl_type::sampler1DShadow_type, glsl_type::vec4_type, TEX_PROJECT),
> - _texture(ir_txb, v130, glsl_type::float_type,
glsl_type::sampler2DShadow_type, glsl_type::vec4_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::float_type,
glsl_type::sampler1DShadow_type, glsl_type::vec4_type, TEX_PROJECT),
> + _texture(ir_txb, v130_fs_only, glsl_type::float_type,
glsl_type::sampler2DShadow_type, glsl_type::vec4_type, TEX_PROJECT),
> NULL);
>
> add_function("texelFetch",
> @@ -1939,26 +1939,26 @@ builtin_builder::create_builtins()
>
> _texture(ir_tex, v130, glsl_type::float_type,
glsl_type::sampler2DRectShadow_type, glsl_type::vec4_type, TEX_PROJECT |
TEX_OFFSET),
>
> - _texture(ir_txb, v130, glsl_type::vec4_type,
glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
> - _texture(ir_txb, v130, glsl_type::ivec4_type,
glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
> - _texture(ir_txb, v130, glsl_type::uvec4_type,
glsl_type::usampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
> - _texture(ir_txb, v130, glsl_type::vec4_type,
glsl_type::sampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> - _texture(ir_txb, v130, glsl_type::ivec4_type,
glsl_type::isampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> - _texture(ir_txb, v130, glsl_type::uvec4_type,
glsl_type::usampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> -
> - _texture(ir_txb, v130, glsl_type::vec4_type,
glsl_type::sampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
> - _texture(ir_txb, v130, glsl_type::ivec4_type,
glsl_type::isampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
> - _texture(ir_txb, v130, glsl_type::uvec4_type,
glsl_type::usampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
> - _texture(ir_txb, v130, glsl_type::vec4_type,
glsl_type::sampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> - _texture(ir_txb, v130, glsl_type::ivec4_type,
glsl_type::isampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> - _texture(ir_txb, v130, glsl_type::uvec4_type,
glsl_type::usampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> -
> - _texture(ir_txb, v130, glsl_type::vec4_type,
glsl_type::sampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> - _texture(ir_txb, v130, glsl_type::ivec4_type,
glsl_type::isampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> - _texture(ir_txb, v130, glsl_type::uvec4_type,
glsl_type::usampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> -
> - _texture(ir_txb, v130, glsl_type::float_type,
glsl_type::sampler1DShadow_type, glsl_type::vec4_type, TEX_PROJECT |
TEX_OFFSET),
> - _texture(ir_txb, v130, glsl_type::float_type,
glsl_type::sampler2DShadow_type, glsl_type::vec4_type, TEX_PROJECT |
TEX_OFFSET),
> + _texture(ir_txb, v130_fs_only, glsl_type::vec4_type,
glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
> + _texture(ir_txb, v130_fs_only, glsl_type::ivec4_type,
glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
> + _texture(ir_txb, v130_fs_only, glsl_type::uvec4_type,
glsl_type::usampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
> + _texture(ir_txb, v130_fs_only, glsl_type::vec4_type,
glsl_type::sampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> + _texture(ir_txb, v130_fs_only, glsl_type::ivec4_type,
glsl_type::isampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> + _texture(ir_txb, v130_fs_only, glsl_type::uvec4_type,
glsl_type::usampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> +
> + _texture(ir_txb, v130_fs_only, glsl_type::vec4_type,
glsl_type::sampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
> + _texture(ir_txb, v130_fs_only, glsl_type::ivec4_type,
glsl_type::isampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
> + _texture(ir_txb, v130_fs_only, glsl_type::uvec4_type,
glsl_type::usampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
> + _texture(ir_txb, v130_fs_only, glsl_type::vec4_type,
glsl_type::sampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> + _texture(ir_txb, v130_fs_only, glsl_type::ivec4_type,
glsl_type::isampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> + _texture(ir_txb, v130_fs_only, glsl_type::uvec4_type,
glsl_type::usampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> +
> + _texture(ir_txb, v130_fs_only, glsl_type::vec4_type,
glsl_type::sampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> + _texture(ir_txb, v130_fs_only, glsl_type::ivec4_type,
glsl_type::isampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> + _texture(ir_txb, v130_fs_only, glsl_type::uvec4_type,
glsl_type::usampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
> +
> + _texture(ir_txb, v130_fs_only, glsl_type::float_type,
glsl_type::sampler1DShadow_type, glsl_type::vec4_type, TEX_PROJECT |
TEX_OFFSET),
> + _texture(ir_txb, v130_fs_only, glsl_type::float_type,
glsl_type::sampler2DShadow_type, glsl_type::vec4_type, TEX_PROJECT |
TEX_OFFSET),
> NULL);
>
> add_function("textureLodOffset",
Yikes. Thanks for fixing this.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160512/2e2f8681/attachment-0001.sig>
More information about the mesa-dev
mailing list