diff options
author | Samuel Pitoiset <[email protected]> | 2017-04-10 19:23:16 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-04-11 10:24:54 +0200 |
commit | 981ba1c89bdb24c292b85f1ac964cf55f60b1a6b (patch) | |
tree | 4418ae54aa867604e56cf44ae3216b4481106ff3 /src/compiler | |
parent | 29082b0b22606b1a2bf3b515ab43d3a2857bb78d (diff) |
glsl: use the BA1 macro for textureSamples()
For both consistency and new bindless sampler types.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/builtin_functions.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp index 0ab7875295b..769799595f9 100644 --- a/src/compiler/glsl/builtin_functions.cpp +++ b/src/compiler/glsl/builtin_functions.cpp @@ -832,7 +832,7 @@ private: B1(all); B1(not); BA2(textureSize); - B1(textureSamples); + BA1(textureSamples); /** Flags to _texture() */ #define TEX_PROJECT 1 @@ -1792,13 +1792,13 @@ builtin_builder::create_builtins() NULL); add_function("textureSamples", - _textureSamples(glsl_type::sampler2DMS_type), - _textureSamples(glsl_type::isampler2DMS_type), - _textureSamples(glsl_type::usampler2DMS_type), + _textureSamples(shader_samples, glsl_type::sampler2DMS_type), + _textureSamples(shader_samples, glsl_type::isampler2DMS_type), + _textureSamples(shader_samples, glsl_type::usampler2DMS_type), - _textureSamples(glsl_type::sampler2DMSArray_type), - _textureSamples(glsl_type::isampler2DMSArray_type), - _textureSamples(glsl_type::usampler2DMSArray_type), + _textureSamples(shader_samples, glsl_type::sampler2DMSArray_type), + _textureSamples(shader_samples, glsl_type::isampler2DMSArray_type), + _textureSamples(shader_samples, glsl_type::usampler2DMSArray_type), NULL); add_function("texture", @@ -4947,10 +4947,11 @@ builtin_builder::_textureSize(builtin_available_predicate avail, } ir_function_signature * -builtin_builder::_textureSamples(const glsl_type *sampler_type) +builtin_builder::_textureSamples(builtin_available_predicate avail, + const glsl_type *sampler_type) { ir_variable *s = in_var(sampler_type, "sampler"); - MAKE_SIG(glsl_type::int_type, shader_samples, 1, s); + MAKE_SIG(glsl_type::int_type, avail, 1, s); ir_texture *tex = new(mem_ctx) ir_texture(ir_texture_samples); tex->set_sampler(new(mem_ctx) ir_dereference_variable(s), glsl_type::int_type); |