diff options
author | Rhys Perry <[email protected]> | 2019-01-16 23:18:26 +0000 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-04-15 16:18:07 -0400 |
commit | 082d180a22ff14ce455cefba2c525c9857f0d00e (patch) | |
tree | af87d0042b29cb0c66085b5774ccf7507e8b1f5a /src/compiler | |
parent | 5131b7a43f8488a797ec880ac2c905614da0aa03 (diff) |
mesa, glsl: add support for EXT_shader_image_load_formatted
v3: rebase
Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Marek Olšák <[email protected]> (v2)
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/ast_to_hir.cpp | 5 | ||||
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.cpp | 1 | ||||
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.h | 7 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 7d927dc4b80..069231d44a8 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -3476,6 +3476,11 @@ apply_image_qualifier_to_variable(const struct ast_type_qualifier *qual, } var->data.image_format = qual->image_format; + } else if (state->has_image_load_formatted()) { + if (var->data.mode == ir_var_uniform && + state->EXT_shader_image_load_formatted_warn) { + _mesa_glsl_warning(loc, state, "GL_EXT_image_load_formatted used"); + } } else { if (var->data.mode == ir_var_uniform) { if (state->es_shader) { diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index c1c3c9649fe..0ffad2d25a0 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -721,6 +721,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = { EXT(EXT_separate_shader_objects), EXT(EXT_shader_framebuffer_fetch), EXT(EXT_shader_framebuffer_fetch_non_coherent), + EXT(EXT_shader_image_load_formatted), EXT(EXT_shader_implicit_conversions), EXT(EXT_shader_integer_mix), EXT_AEP(EXT_shader_io_blocks), diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h index 82a2ce3424b..8646ba6cadd 100644 --- a/src/compiler/glsl/glsl_parser_extras.h +++ b/src/compiler/glsl/glsl_parser_extras.h @@ -344,6 +344,11 @@ struct _mesa_glsl_parse_state { return ARB_bindless_texture_enable; } + bool has_image_load_formatted() const + { + return EXT_shader_image_load_formatted_enable; + } + bool has_implicit_conversions() const { return EXT_shader_implicit_conversions_enable || is_version(120, 0); @@ -822,6 +827,8 @@ struct _mesa_glsl_parse_state { bool EXT_shader_framebuffer_fetch_warn; bool EXT_shader_framebuffer_fetch_non_coherent_enable; bool EXT_shader_framebuffer_fetch_non_coherent_warn; + bool EXT_shader_image_load_formatted_enable; + bool EXT_shader_image_load_formatted_warn; bool EXT_shader_implicit_conversions_enable; bool EXT_shader_implicit_conversions_warn; bool EXT_shader_integer_mix_enable; |