On 14/08/15 08:42, Pohjolainen, Topi wrote:
On Thu, Aug 13, 2015 at 07:58:53PM +0300, Martin Peres wrote:
The code is heavily inspired from Francisco Jerez's code supporting the
image_load_store extension.
Backends willing to support this builtin should handle
__intrinsic_image_size.
v2: Based on the review of Ilia Mirkin
- Enable the extension for GLES 3.1
- Fix indentation
- Fix the return type (float to int, number of components for CubeImages)
- Add a warning related to GLES 3.1
v3: Based on the review of Francisco Jerez
- Refactor the code to share both add_image_function and _image with the other
image-related functions
Signed-off-by: Martin Peres <martin.pe...@linux.intel.com>
---
src/glsl/builtin_functions.cpp | 109 +++++++++++++++++++++++++++++++++++------
1 file changed, 93 insertions(+), 16 deletions(-)
diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp
index 2175c66..5d0a825 100644
--- a/src/glsl/builtin_functions.cpp
+++ b/src/glsl/builtin_functions.cpp
@@ -399,6 +399,13 @@ shader_image_load_store(const _mesa_glsl_parse_state
*state)
}
static bool
+shader_image_size(const _mesa_glsl_parse_state *state)
+{
+ return (state->is_version(430, 310) ||
+ state->ARB_shader_image_size_enable);
You can drop the extra ().
Thanks, fixed locally.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev