From 687be4f31bc4e7ab9f6b54b74ea4cebf63a9d1f3 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Sun, 17 Mar 2013 11:29:03 -0700 Subject: [PATCH] Updated glsl-optimizer. --- 3rdparty/glsl-optimizer/README.md | 2 +- .../glsl-optimizer/src/glsl/ast_to_hir.cpp | 26 +- .../src/glsl/builtin_function.cpp | 40 +- .../src/glsl/builtin_variables.cpp | 5 + .../profiles/EXT_shadow_samplers.vert | 2 + .../glsl-optimizer/src/glsl/glcpp/glcpp.c | 122 ----- .../src/glsl/glsl_optimizer.cpp | 18 +- .../src/glsl/glsl_parser_extras.cpp | 5 +- .../src/glsl/glsl_parser_extras.h | 2 + 3rdparty/glsl-optimizer/src/glsl/ir.h | 27 ++ 3rdparty/glsl-optimizer/src/glsl/ir_clone.cpp | 17 +- .../src/glsl/ir_hierarchical_visitor.cpp | 9 + .../src/glsl/ir_hierarchical_visitor.h | 1 + .../glsl-optimizer/src/glsl/ir_hv_accept.cpp | 6 + .../src/glsl/ir_print_glsl_visitor.cpp | 58 ++- .../src/glsl/ir_print_visitor.cpp | 6 + .../src/glsl/ir_print_visitor.h | 1 + .../src/glsl/ir_set_program_inouts.cpp | 213 --------- 3rdparty/glsl-optimizer/src/glsl/ir_visitor.h | 1 + 3rdparty/glsl-optimizer/src/glsl/linker.cpp | 7 +- .../glsl-optimizer/src/glsl/lower_jumps.cpp | 9 +- .../src/glsl/msvc/mesaglsl2.sln | 10 + .../src/glsl/msvc/mesaglsl2.vcproj | 240 +++++++++- .../src/glsl/opt_constant_variable.cpp | 18 + .../xcode/mesaglsl2.xcodeproj/project.pbxproj | 28 +- .../glsl-optimizer/src/mesa/main/mtypes.h | 1 + .../tests/fragment/bug-const-variable-in.txt | 19 + .../tests/fragment/bug-const-variable-ir.txt | 35 ++ .../tests/fragment/bug-const-variable-out.txt | 23 + .../tests/fragment/fragdepth-in.txt | 11 + .../tests/fragment/fragdepth-inES.txt | 12 + .../tests/fragment/fragdepth-ir.txt | 28 ++ .../tests/fragment/fragdepth-irES.txt | 29 ++ .../tests/fragment/fragdepth-out.txt | 6 + .../tests/fragment/fragdepth-outES.txt | 7 + .../tests/fragment/loop-fornounroll-inES.txt | 7 + .../tests/fragment/loop-fornounroll-irES.txt | 28 ++ .../tests/fragment/loop-fornounroll-outES.txt | 13 + .../tests/fragment/prec-default-inES.txt | 17 + .../tests/fragment/prec-default-irES.txt | 27 ++ .../tests/fragment/prec-default-outES.txt | 25 + .../tests/fragment/prec-tempssimple-irES.txt | 2 +- .../tests/fragment/prec-tempssimple-outES.txt | 2 +- .../tests/fragment/sampler-precision-inES.txt | 23 + .../tests/fragment/sampler-precision-irES.txt | 58 +++ .../fragment/sampler-precision-outES.txt | 36 ++ .../tests/fragment/tex2dlod-inES.txt | 4 +- .../tests/fragment/tex2dlod-irES.txt | 4 +- .../tests/fragment/tex2dlod-outES.txt | 4 +- .../tests/fragment/texProj-outES.txt | 2 +- .../tests/fragment/z-fxaa-preset3-in.txt | 202 ++++---- .../tests/fragment/z-fxaa-preset3-ir.txt | 450 +++++++++--------- .../tests/fragment/z-fxaa-preset3-out.txt | 11 +- .../fragment/z-fxaa3-11-consolepc-outES.txt | 14 +- .../tests/fragment/z-fxaa3-11-pc39-outES.txt | 64 +-- .../project.pbxproj | 20 +- .../tests/glsl_optimizer_tests.cpp | 3 + .../tests/glsl_optimizer_tests.vcproj | 158 ++++++ examples/runtime/shaders/dx11/fs_bump.bin | Bin 4484 -> 4624 bytes examples/runtime/shaders/dx11/fs_mesh.bin | Bin 2275 -> 2395 bytes .../runtime/shaders/dx11/fs_raymarching.bin | Bin 10703 -> 10823 bytes examples/runtime/shaders/dx11/vs_bump.bin | Bin 2724 -> 2864 bytes examples/runtime/shaders/dx11/vs_callback.bin | Bin 1278 -> 1418 bytes examples/runtime/shaders/dx11/vs_cubes.bin | Bin 1076 -> 1216 bytes .../runtime/shaders/dx11/vs_instancing.bin | Bin 1403 -> 1543 bytes examples/runtime/shaders/dx11/vs_mesh.bin | Bin 2047 -> 2167 bytes .../runtime/shaders/dx11/vs_metaballs.bin | Bin 1290 -> 1430 bytes .../runtime/shaders/dx11/vs_raymarching.bin | Bin 1184 -> 1324 bytes examples/runtime/shaders/dx11/vs_update.bin | Bin 1084 -> 1224 bytes tools/bin/shaderc.exe | Bin 1084416 -> 1084416 bytes 70 files changed, 1423 insertions(+), 795 deletions(-) create mode 100644 3rdparty/glsl-optimizer/src/glsl/builtins/profiles/EXT_shadow_samplers.vert delete mode 100644 3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp.c delete mode 100644 3rdparty/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp create mode 100644 3rdparty/glsl-optimizer/tests/fragment/bug-const-variable-in.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/bug-const-variable-ir.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/bug-const-variable-out.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/fragdepth-in.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/fragdepth-inES.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/fragdepth-ir.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/fragdepth-irES.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/fragdepth-out.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/fragdepth-outES.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/loop-fornounroll-inES.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/loop-fornounroll-irES.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/loop-fornounroll-outES.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/prec-default-inES.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/prec-default-irES.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/prec-default-outES.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/sampler-precision-inES.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/sampler-precision-irES.txt create mode 100644 3rdparty/glsl-optimizer/tests/fragment/sampler-precision-outES.txt diff --git a/3rdparty/glsl-optimizer/README.md b/3rdparty/glsl-optimizer/README.md index 32e4fa978..28f9c4856 100644 --- a/3rdparty/glsl-optimizer/README.md +++ b/3rdparty/glsl-optimizer/README.md @@ -23,7 +23,7 @@ GLSL Optimizer is licensed according to the terms of the MIT license. Usage ----- -Visual Studio 2008 (Windows, x86) and Xcode 3.2 (Mac, i386) project files for a static +Visual Studio 2008 (Windows, x86) and Xcode 4.5+ (Mac, i386) project files for a static library are provided in `src/glsl/msvc/mesaglsl2.vcproj` and `src/glsl/xcode/mesaglsl2` respectively. diff --git a/3rdparty/glsl-optimizer/src/glsl/ast_to_hir.cpp b/3rdparty/glsl-optimizer/src/glsl/ast_to_hir.cpp index 8a3229673..8b474caf4 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ast_to_hir.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/ast_to_hir.cpp @@ -2984,8 +2984,15 @@ ast_declarator_list::hir(exec_list *instructions, * but otherwise we run into trouble if a function is prototyped, a * global var is decled, then the function is defined with usage of * the global var. See glslparsertest's CorrectModule.frag. + * However, do not insert declarations before default precision statements. */ - instructions->push_head(var); + exec_node* before_node = instructions->head; + while (before_node && ((ir_instruction*)before_node)->ir_type == ir_type_precision) + before_node = before_node->next; + if (before_node) + before_node->insert_before(var); + else + instructions->push_head(var); } instructions->append_list(&initializer_instructions); @@ -3943,7 +3950,22 @@ ast_type_specifier::hir(exec_list *instructions, return NULL; } - /* FINISHME: Translate precision statements into IR. */ + { + void *ctx = state; + + const char* precision_type = NULL; + switch (this->precision) { + case glsl_precision_high: precision_type = "highp"; break; + case glsl_precision_medium: precision_type = "mediump"; break; + case glsl_precision_low: precision_type = "lowp"; break; + case glsl_precision_undefined: precision_type = ""; break; + } + char* precision_statement = ralloc_asprintf(ctx, "precision %s %s", precision_type, this->type_name); + + ir_precision_statement *const stmt = new(ctx) ir_precision_statement(precision_statement); + + instructions->push_head(stmt); + } return NULL; } diff --git a/3rdparty/glsl-optimizer/src/glsl/builtin_function.cpp b/3rdparty/glsl-optimizer/src/glsl/builtin_function.cpp index 2d7708068..3a452a09c 100644 --- a/3rdparty/glsl-optimizer/src/glsl/builtin_function.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/builtin_function.cpp @@ -14474,6 +14474,25 @@ static const char *functions_for_EXT_shadow_samplers_frag [] = { builtin_shadow2DEXT, builtin_shadow2DProjEXT, }; +static const char prototypes_for_EXT_shadow_samplers_vert[] = + "(\n" + "(function shadow2DEXT\n" + " (signature float\n" + " (parameters\n" + " (declare (in) sampler2DShadow sampler)\n" + " (declare (in) vec3 coord))\n" + " ()))\n" + "(function shadow2DProjEXT\n" + " (signature float\n" + " (parameters\n" + " (declare (in) sampler2DShadow sampler)\n" + " (declare (in) vec4 coord))\n" + " ())))" +; +static const char *functions_for_EXT_shadow_samplers_vert [] = { + builtin_shadow2DEXT, + builtin_shadow2DProjEXT, +}; static const char prototypes_for_EXT_texture_array_frag[] = "(\n" "(function texture1DArray\n" @@ -14731,7 +14750,7 @@ static const char *functions_for_OES_texture_3D_vert [] = { builtin_texture3DProj, builtin_texture3DProjLod, }; -static gl_shader *builtin_profiles[27]; +static gl_shader *builtin_profiles[28]; static void *builtin_mem_ctx = NULL; @@ -14921,43 +14940,50 @@ _mesa_glsl_initialize_functions(struct _mesa_glsl_parse_state *state) Elements(functions_for_EXT_shadow_samplers_frag)); } - if (state->target == fragment_shader && state->EXT_texture_array_enable) { + if (state->target == vertex_shader && state->EXT_shadow_samplers_enable) { _mesa_read_profile(state, 21, + prototypes_for_EXT_shadow_samplers_vert, + functions_for_EXT_shadow_samplers_vert, + Elements(functions_for_EXT_shadow_samplers_vert)); + } + + if (state->target == fragment_shader && state->EXT_texture_array_enable) { + _mesa_read_profile(state, 22, prototypes_for_EXT_texture_array_frag, functions_for_EXT_texture_array_frag, Elements(functions_for_EXT_texture_array_frag)); } if (state->target == vertex_shader && state->EXT_texture_array_enable) { - _mesa_read_profile(state, 22, + _mesa_read_profile(state, 23, prototypes_for_EXT_texture_array_vert, functions_for_EXT_texture_array_vert, Elements(functions_for_EXT_texture_array_vert)); } if (state->OES_EGL_image_external_enable) { - _mesa_read_profile(state, 23, + _mesa_read_profile(state, 24, prototypes_for_OES_EGL_image_external_glsl, functions_for_OES_EGL_image_external_glsl, Elements(functions_for_OES_EGL_image_external_glsl)); } if (state->target == fragment_shader && state->OES_standard_derivatives_enable) { - _mesa_read_profile(state, 24, + _mesa_read_profile(state, 25, prototypes_for_OES_standard_derivatives_frag, functions_for_OES_standard_derivatives_frag, Elements(functions_for_OES_standard_derivatives_frag)); } if (state->target == fragment_shader && state->OES_texture_3D_enable) { - _mesa_read_profile(state, 25, + _mesa_read_profile(state, 26, prototypes_for_OES_texture_3D_frag, functions_for_OES_texture_3D_frag, Elements(functions_for_OES_texture_3D_frag)); } if (state->target == vertex_shader && state->OES_texture_3D_enable) { - _mesa_read_profile(state, 26, + _mesa_read_profile(state, 27, prototypes_for_OES_texture_3D_vert, functions_for_OES_texture_3D_vert, Elements(functions_for_OES_texture_3D_vert)); diff --git a/3rdparty/glsl-optimizer/src/glsl/builtin_variables.cpp b/3rdparty/glsl-optimizer/src/glsl/builtin_variables.cpp index a03e0e0b8..764ab28fe 100644 --- a/3rdparty/glsl-optimizer/src/glsl/builtin_variables.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/builtin_variables.cpp @@ -812,6 +812,11 @@ generate_100ES_fs_variables(exec_list *instructions, add_builtin_variable(instructions, state->symbols, & builtin_100ES_fs_variables[i], state->es_shader); } + + if (state->EXT_frag_depth_enable) { + const builtin_variable fragDepthEXT = { ir_var_out, FRAG_RESULT_DEPTH, "float", "gl_FragDepthEXT", glsl_precision_high }; + add_builtin_variable(instructions, state->symbols, &fragDepthEXT, state->es_shader); + } generate_100ES_uniforms(instructions, state); diff --git a/3rdparty/glsl-optimizer/src/glsl/builtins/profiles/EXT_shadow_samplers.vert b/3rdparty/glsl-optimizer/src/glsl/builtins/profiles/EXT_shadow_samplers.vert new file mode 100644 index 000000000..61ee421d1 --- /dev/null +++ b/3rdparty/glsl-optimizer/src/glsl/builtins/profiles/EXT_shadow_samplers.vert @@ -0,0 +1,2 @@ +float shadow2DEXT (sampler2DShadow sampler, vec3 coord); +float shadow2DProjEXT (sampler2DShadow sampler, vec4 coord); diff --git a/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp.c b/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp.c deleted file mode 100644 index 1b742644d..000000000 --- a/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include -#include "glcpp.h" -#include "main/mtypes.h" -#include "../standalone_scaffolding.h" - -extern int yydebug; - -void -_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr, - struct gl_shader *sh) -{ - (void) ctx; - *ptr = sh; -} - -/* Read from fp until EOF and return a string of everything read. - */ -static char * -load_text_fp (void *ctx, FILE *fp) -{ -#define CHUNK 4096 - char *text = NULL; - size_t text_size = 0; - size_t total_read = 0; - size_t bytes; - - while (1) { - if (total_read + CHUNK + 1 > text_size) { - text_size = text_size ? text_size * 2 : CHUNK + 1; - text = reralloc_size (ctx, text, text_size); - if (text == NULL) { - fprintf (stderr, "Out of memory\n"); - return NULL; - } - } - bytes = fread (text + total_read, 1, CHUNK, fp); - total_read += bytes; - - if (bytes < CHUNK) { - break; - } - } - - text[total_read] = '\0'; - - return text; -} - -static char * -load_text_file(void *ctx, const char *filename) -{ - char *text; - FILE *fp; - - if (filename == NULL || strcmp (filename, "-") == 0) - return load_text_fp (ctx, stdin); - - fp = fopen (filename, "r"); - if (fp == NULL) { - fprintf (stderr, "Failed to open file %s: %s\n", - filename, strerror (errno)); - return NULL; - } - - text = load_text_fp (ctx, fp); - - fclose(fp); - - return text; -} - -int -main (int argc, char *argv[]) -{ - char *filename = NULL; - void *ctx = ralloc(NULL, void*); - char *info_log = ralloc_strdup(ctx, ""); - const char *shader; - int ret; - - if (argc) { - filename = argv[1]; - } - - shader = load_text_file (ctx, filename); - if (shader == NULL) - return 1; - - ret = glcpp_preprocess(ctx, &shader, &info_log, NULL, API_OPENGL); - - printf("%s", shader); - fprintf(stderr, "%s", info_log); - - ralloc_free(ctx); - - return ret; -} diff --git a/3rdparty/glsl-optimizer/src/glsl/glsl_optimizer.cpp b/3rdparty/glsl-optimizer/src/glsl/glsl_optimizer.cpp index 41a73fcd6..69318ee0a 100644 --- a/3rdparty/glsl-optimizer/src/glsl/glsl_optimizer.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/glsl_optimizer.cpp @@ -31,6 +31,7 @@ initialize_mesa_context(struct gl_context *ctx, gl_api api) { ctx->Extensions.OES_standard_derivatives = GL_TRUE; ctx->Extensions.EXT_shadow_samplers = GL_TRUE; + ctx->Extensions.EXT_frag_depth = GL_TRUE; } ctx->Const.GLSLVersion = 140; @@ -137,7 +138,7 @@ static inline void debug_print_ir (const char* name, exec_list* ir, _mesa_glsl_p printf("**** %s:\n", name); //_mesa_print_ir (ir, state); char* foobar = _mesa_print_ir_glsl(ir, state, ralloc_strdup(memctx, ""), kPrintGlslFragment); - printf(foobar); + printf("%s\n", foobar); validate_ir_tree(ir); #endif } @@ -363,13 +364,15 @@ glslopt_shader* glslopt_optimize (glslopt_ctx* ctx, glslopt_shader_type type, co memcpy(shader->shader->builtins_to_link, state->builtins_to_link, sizeof(shader->shader->builtins_to_link[0]) * state->num_builtins_to_link); shader->shader->num_builtins_to_link = state->num_builtins_to_link; + struct gl_shader* linked_shader = 0; + if (!state->error && !ir->is_empty()) { - struct gl_shader* linked_shader = link_intrastage_shaders(ctx->mem_ctx, - &ctx->mesa_ctx, - shader->whole_program, - shader->whole_program->Shaders, - shader->whole_program->NumShaders); + linked_shader = link_intrastage_shaders(ctx->mem_ctx, + &ctx->mesa_ctx, + shader->whole_program, + shader->whole_program->Shaders, + shader->whole_program->NumShaders); if (!linked_shader) { shader->status = false; @@ -401,6 +404,9 @@ glslopt_shader* glslopt_optimize (glslopt_ctx* ctx, glslopt_shader_type type, co ralloc_free (ir); ralloc_free (state); + if (linked_shader) + ralloc_free(linked_shader); + return shader; } diff --git a/3rdparty/glsl-optimizer/src/glsl/glsl_parser_extras.cpp b/3rdparty/glsl-optimizer/src/glsl/glsl_parser_extras.cpp index 7533819b6..0d93af8d8 100644 --- a/3rdparty/glsl-optimizer/src/glsl/glsl_parser_extras.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/glsl_parser_extras.cpp @@ -280,8 +280,9 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = { EXT(OES_EGL_image_external, true, false, true, false, true, OES_EGL_image_external), EXT(ARB_shader_bit_encoding, true, true, true, true, false, ARB_shader_bit_encoding), EXT(ARB_uniform_buffer_object, true, false, true, true, false, ARB_uniform_buffer_object), - EXT(OES_standard_derivatives, false, false, true, false, true, OES_standard_derivatives), - EXT(EXT_shadow_samplers, false, false, true, false, true, EXT_shadow_samplers), + EXT(OES_standard_derivatives, false, false, true, false, true, OES_standard_derivatives), + EXT(EXT_shadow_samplers, true, false, true, false, true, EXT_shadow_samplers), + EXT(EXT_frag_depth, true, false, true, false, true, EXT_frag_depth), }; #undef EXT diff --git a/3rdparty/glsl-optimizer/src/glsl/glsl_parser_extras.h b/3rdparty/glsl-optimizer/src/glsl/glsl_parser_extras.h index 8d51e0def..f45aa4b9e 100644 --- a/3rdparty/glsl-optimizer/src/glsl/glsl_parser_extras.h +++ b/3rdparty/glsl-optimizer/src/glsl/glsl_parser_extras.h @@ -191,6 +191,8 @@ struct _mesa_glsl_parse_state { bool EXT_shader_texture_lod_warn; bool EXT_shadow_samplers_enable; bool EXT_shadow_samplers_warn; + bool EXT_frag_depth_enable; + bool EXT_frag_depth_warn; bool ARB_shader_stencil_export_enable; bool ARB_shader_stencil_export_warn; bool AMD_conservative_depth_enable; diff --git a/3rdparty/glsl-optimizer/src/glsl/ir.h b/3rdparty/glsl-optimizer/src/glsl/ir.h index f0580bcff..e2abd3787 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ir.h +++ b/3rdparty/glsl-optimizer/src/glsl/ir.h @@ -80,6 +80,7 @@ enum ir_node_type { ir_type_return, ir_type_swizzle, ir_type_texture, + ir_type_precision, ir_type_max /**< maximum ir_type enum number, for validation */ }; @@ -1813,6 +1814,32 @@ private: ir_constant(void); }; + +class ir_precision_statement : public ir_instruction { +public: + ir_precision_statement(const char *statement_to_store) + { + ir_type = ir_type_precision; + precision_statement = statement_to_store; + } + + virtual ir_precision_statement *clone(void *mem_ctx, struct hash_table *) const; + + virtual void accept(ir_visitor *v) + { + v->visit(this); + } + + virtual ir_visitor_status accept(ir_hierarchical_visitor *); + + /** + * Precision statement + */ + const char *precision_statement; +}; + + + /*@}*/ /** diff --git a/3rdparty/glsl-optimizer/src/glsl/ir_clone.cpp b/3rdparty/glsl-optimizer/src/glsl/ir_clone.cpp index 8e55b4fbb..9f791c834 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ir_clone.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/ir_clone.cpp @@ -155,7 +155,14 @@ ir_loop::clone(void *mem_ctx, struct hash_table *ht) const new_loop->to = this->to->clone(mem_ctx, ht); if (this->increment) new_loop->increment = this->increment->clone(mem_ctx, ht); - new_loop->counter = counter; + + if (ht) { + new_loop->counter = (ir_variable *)hash_table_find(ht, this->counter); + if (!new_loop->counter) + new_loop->counter = this->counter; + } else { + new_loop->counter = this->counter; + } foreach_iter(exec_list_iterator, iter, this->body_instructions) { ir_instruction *ir = (ir_instruction *)iter.get(); @@ -388,6 +395,14 @@ ir_constant::clone(void *mem_ctx, struct hash_table *ht) const } +ir_precision_statement * +ir_precision_statement::clone(void *mem_ctx, struct hash_table *ht) const +{ + return new(mem_ctx) ir_precision_statement(this->precision_statement); +} + + + class fixup_ir_call_visitor : public ir_hierarchical_visitor { public: fixup_ir_call_visitor(struct hash_table *ht) diff --git a/3rdparty/glsl-optimizer/src/glsl/ir_hierarchical_visitor.cpp b/3rdparty/glsl-optimizer/src/glsl/ir_hierarchical_visitor.cpp index f24414046..f4c378587 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ir_hierarchical_visitor.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/ir_hierarchical_visitor.cpp @@ -68,6 +68,15 @@ ir_hierarchical_visitor::visit(ir_loop_jump *ir) return visit_continue; } +ir_visitor_status +ir_hierarchical_visitor::visit(ir_precision_statement *ir) +{ + if (this->callback != NULL) + this->callback(ir, this->data); + + return visit_continue; +} + ir_visitor_status ir_hierarchical_visitor::visit(ir_dereference_variable *ir) { diff --git a/3rdparty/glsl-optimizer/src/glsl/ir_hierarchical_visitor.h b/3rdparty/glsl-optimizer/src/glsl/ir_hierarchical_visitor.h index 143eb7c88..d507b3212 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ir_hierarchical_visitor.h +++ b/3rdparty/glsl-optimizer/src/glsl/ir_hierarchical_visitor.h @@ -86,6 +86,7 @@ public: virtual ir_visitor_status visit(class ir_variable *); virtual ir_visitor_status visit(class ir_constant *); virtual ir_visitor_status visit(class ir_loop_jump *); + virtual ir_visitor_status visit(class ir_precision_statement *); /** * ir_dereference_variable isn't technically a leaf, but it is treated as a diff --git a/3rdparty/glsl-optimizer/src/glsl/ir_hv_accept.cpp b/3rdparty/glsl-optimizer/src/glsl/ir_hv_accept.cpp index c29d357f1..a828d8ac0 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ir_hv_accept.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/ir_hv_accept.cpp @@ -397,3 +397,9 @@ ir_if::accept(ir_hierarchical_visitor *v) return v->visit_leave(this); } + +ir_visitor_status +ir_precision_statement::accept(ir_hierarchical_visitor *v) +{ + return v->visit(this); +} diff --git a/3rdparty/glsl-optimizer/src/glsl/ir_print_glsl_visitor.cpp b/3rdparty/glsl-optimizer/src/glsl/ir_print_glsl_visitor.cpp index b2a0c89d7..614bb3498 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ir_print_glsl_visitor.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/ir_print_glsl_visitor.cpp @@ -113,7 +113,8 @@ public: virtual void visit(ir_if *); virtual void visit(ir_loop *); virtual void visit(ir_loop_jump *); - + virtual void visit(ir_precision_statement *); + int indentation; char* buffer; global_print_tracker* globals; @@ -139,6 +140,8 @@ _mesa_print_ir_glsl(exec_list *instructions, ralloc_strcat (&buffer, "#extension GL_OES_standard_derivatives : enable\n"); if (state->EXT_shadow_samplers_enable) ralloc_strcat (&buffer, "#extension GL_EXT_shadow_samplers : enable\n"); + if (state->EXT_frag_depth_enable) + ralloc_strcat (&buffer, "#extension GL_EXT_frag_depth : enable\n"); } if (state) { ir_struct_usage_visitor v; @@ -173,7 +176,8 @@ _mesa_print_ir_glsl(exec_list *instructions, ir_instruction *ir = (ir_instruction *)iter.get(); if (ir->ir_type == ir_type_variable) { ir_variable *var = static_cast(ir); - if (strstr(var->name, "gl_") == var->name) + if ((strstr(var->name, "gl_") == var->name) + && !var->invariant) continue; } @@ -219,9 +223,23 @@ void ir_print_glsl_visitor::print_precision (ir_instruction* ir, const glsl_type { if (!this->use_precision) return; - if (type && !type->is_float() && (!type->is_array() || !type->element_type()->is_float())) + if (type && + !type->is_float() && + !type->is_sampler() && + (!type->is_array() || !type->element_type()->is_float()) + ) + { return; + } glsl_precision prec = precision_from_ir(ir); + + // skip precision for samplers that end up being lowp (default anyway) or undefined + if (type && type->is_sampler()) + { + if (prec == glsl_precision_low || prec == glsl_precision_undefined) + return; + } + if (prec == glsl_precision_high || prec == glsl_precision_undefined) { if (ir->ir_type == ir_type_function_signature) @@ -288,6 +306,13 @@ void ir_print_glsl_visitor::visit(ir_variable *ir) } } + // keep invariant declaration for builtin variables + if (strstr(ir->name, "gl_") == ir->name) { + ralloc_asprintf_append (&buffer, "%s", inv); + print_var_name (ir); + return; + } + ralloc_asprintf_append (&buffer, "%s%s%s%s", cent, inv, interp[ir->interpolation], mode[decormode][ir->mode]); print_precision (ir, ir->type); @@ -582,19 +607,30 @@ void ir_print_glsl_visitor::visit(ir_texture *ir) sampler_uv_dim = 3; const bool is_proj = (uv_dim > sampler_uv_dim); - // texture function name - ralloc_asprintf_append (&buffer, "%s", is_shadow ? "shadow" : "texture"); - ralloc_asprintf_append (&buffer, "%s", tex_sampler_dim_name[sampler_dim]); + // texture function name + //ACS: shadow lookups and lookups with dimensionality included in the name were deprecated in 130 + if(state->language_version<130) + { + ralloc_asprintf_append (&buffer, "%s", is_shadow ? "shadow" : "texture"); + ralloc_asprintf_append (&buffer, "%s", tex_sampler_dim_name[sampler_dim]); + } + else + { + ralloc_asprintf_append (&buffer, "texture"); + } if (is_proj) ralloc_asprintf_append (&buffer, "Proj"); if (ir->op == ir_txl) ralloc_asprintf_append (&buffer, "Lod"); - if (is_shadow) + if (state->es_shader) { - if (state->EXT_shadow_samplers_enable && state->es_shader) + if ( (is_shadow && state->EXT_shadow_samplers_enable) || + (ir->op == ir_txl && state->EXT_shader_texture_lod_enable) ) + { ralloc_asprintf_append (&buffer, "EXT"); + } } ralloc_asprintf_append (&buffer, " ("); @@ -1073,3 +1109,9 @@ ir_print_glsl_visitor::visit(ir_loop_jump *ir) { ralloc_asprintf_append (&buffer, "%s", ir->is_break() ? "break" : "continue"); } + +void +ir_print_glsl_visitor::visit(ir_precision_statement *ir) +{ + ralloc_asprintf_append (&buffer, "%s", ir->precision_statement); +} diff --git a/3rdparty/glsl-optimizer/src/glsl/ir_print_visitor.cpp b/3rdparty/glsl-optimizer/src/glsl/ir_print_visitor.cpp index de048cec0..40f094103 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ir_print_visitor.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/ir_print_visitor.cpp @@ -514,3 +514,9 @@ ir_print_visitor::visit(ir_loop_jump *ir) { printf("%s", ir->is_break() ? "break" : "continue"); } + +void +ir_print_visitor::visit(ir_precision_statement *ir) +{ + printf("%s", ir->precision_statement); +} diff --git a/3rdparty/glsl-optimizer/src/glsl/ir_print_visitor.h b/3rdparty/glsl-optimizer/src/glsl/ir_print_visitor.h index 6c308f31e..dfdf293c4 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ir_print_visitor.h +++ b/3rdparty/glsl-optimizer/src/glsl/ir_print_visitor.h @@ -72,6 +72,7 @@ public: virtual void visit(ir_if *); virtual void visit(ir_loop *); virtual void visit(ir_loop_jump *); + virtual void visit(ir_precision_statement *); /*@}*/ private: diff --git a/3rdparty/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp b/3rdparty/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp deleted file mode 100644 index e5de07e01..000000000 --- a/3rdparty/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ir_set_program_inouts.cpp - * - * Sets the InputsRead and OutputsWritten of Mesa programs. - * - * Additionally, for fragment shaders, sets the InterpQualifier array, the - * IsCentroid bitfield, and the UsesDFdy flag. - * - * Mesa programs (gl_program, not gl_shader_program) have a set of - * flags indicating which varyings are read and written. Computing - * which are actually read from some sort of backend code can be - * tricky when variable array indexing involved. So this pass - * provides support for setting InputsRead and OutputsWritten right - * from the GLSL IR. - */ - -#include "main/core.h" /* for struct gl_program */ -#include "program/hash_table.h" -#include "ir.h" -#include "ir_visitor.h" -#include "glsl_types.h" - -class ir_set_program_inouts_visitor : public ir_hierarchical_visitor { -public: - ir_set_program_inouts_visitor(struct gl_program *prog, - bool is_fragment_shader) - { - this->prog = prog; - this->is_fragment_shader = is_fragment_shader; - this->ht = hash_table_ctor(0, - hash_table_pointer_hash, - hash_table_pointer_compare); - } - ~ir_set_program_inouts_visitor() - { - hash_table_dtor(this->ht); - } - - virtual ir_visitor_status visit_enter(ir_dereference_array *); - virtual ir_visitor_status visit_enter(ir_function_signature *); - virtual ir_visitor_status visit_enter(ir_expression *); - virtual ir_visitor_status visit_enter(ir_discard *); - virtual ir_visitor_status visit(ir_dereference_variable *); - virtual ir_visitor_status visit(ir_variable *); - - struct gl_program *prog; - struct hash_table *ht; - bool is_fragment_shader; -}; - -static void -mark(struct gl_program *prog, ir_variable *var, int offset, int len, - bool is_fragment_shader) -{ - /* As of GLSL 1.20, varyings can only be floats, floating-point - * vectors or matrices, or arrays of them. For Mesa programs using - * InputsRead/OutputsWritten, everything but matrices uses one - * slot, while matrices use a slot per column. Presumably - * something doing a more clever packing would use something other - * than InputsRead/OutputsWritten. - */ - - for (int i = 0; i < len; i++) { - GLbitfield64 bitfield = BITFIELD64_BIT(var->location + var->index + offset + i); - if (var->mode == ir_var_in) { - prog->InputsRead |= bitfield; - if (is_fragment_shader) { - gl_fragment_program *fprog = (gl_fragment_program *) prog; - fprog->InterpQualifier[var->location + var->index + offset + i] = - (glsl_interp_qualifier) var->interpolation; - if (var->centroid) - fprog->IsCentroid |= bitfield; - } - } else if (var->mode == ir_var_system_value) { - prog->SystemValuesRead |= bitfield; - } else { - prog->OutputsWritten |= bitfield; - } - } -} - -/* Default handler: Mark all the locations in the variable as used. */ -ir_visitor_status -ir_set_program_inouts_visitor::visit(ir_dereference_variable *ir) -{ - if (hash_table_find(this->ht, ir->var) == NULL) - return visit_continue; - - if (ir->type->is_array()) { - mark(this->prog, ir->var, 0, - ir->type->length * ir->type->fields.array->matrix_columns, - this->is_fragment_shader); - } else { - mark(this->prog, ir->var, 0, ir->type->matrix_columns, - this->is_fragment_shader); - } - - return visit_continue; -} - -ir_visitor_status -ir_set_program_inouts_visitor::visit_enter(ir_dereference_array *ir) -{ - ir_dereference_variable *deref_var; - ir_constant *index = ir->array_index->as_constant(); - deref_var = ir->array->as_dereference_variable(); - ir_variable *var = NULL; - - /* Check that we're dereferencing a shader in or out */ - if (deref_var) - var = (ir_variable *)hash_table_find(this->ht, deref_var->var); - - if (index && var) { - int width = 1; - - if (deref_var->type->is_array() && - deref_var->type->fields.array->is_matrix()) { - width = deref_var->type->fields.array->matrix_columns; - } - - mark(this->prog, var, index->value.i[0] * width, width, - this->is_fragment_shader); - return visit_continue_with_parent; - } - - return visit_continue; -} - -ir_visitor_status -ir_set_program_inouts_visitor::visit(ir_variable *ir) -{ - if (ir->mode == ir_var_in || - ir->mode == ir_var_out || - ir->mode == ir_var_system_value) { - hash_table_insert(this->ht, ir, ir); - } - - return visit_continue; -} - -ir_visitor_status -ir_set_program_inouts_visitor::visit_enter(ir_function_signature *ir) -{ - /* We don't want to descend into the function parameters and - * consider them as shader inputs or outputs. - */ - visit_list_elements(this, &ir->body); - return visit_continue_with_parent; -} - -ir_visitor_status -ir_set_program_inouts_visitor::visit_enter(ir_expression *ir) -{ - if (is_fragment_shader && ir->operation == ir_unop_dFdy) { - gl_fragment_program *fprog = (gl_fragment_program *) prog; - fprog->UsesDFdy = true; - } - return visit_continue; -} - -ir_visitor_status -ir_set_program_inouts_visitor::visit_enter(ir_discard *) -{ - /* discards are only allowed in fragment shaders. */ - assert(is_fragment_shader); - - gl_fragment_program *fprog = (gl_fragment_program *) prog; - fprog->UsesKill = true; - - return visit_continue; -} - -void -do_set_program_inouts(exec_list *instructions, struct gl_program *prog, - bool is_fragment_shader) -{ - ir_set_program_inouts_visitor v(prog, is_fragment_shader); - - prog->InputsRead = 0; - prog->OutputsWritten = 0; - prog->SystemValuesRead = 0; - if (is_fragment_shader) { - gl_fragment_program *fprog = (gl_fragment_program *) prog; - memset(fprog->InterpQualifier, 0, sizeof(fprog->InterpQualifier)); - fprog->IsCentroid = 0; - fprog->UsesDFdy = false; - fprog->UsesKill = false; - } - visit_list_elements(&v, instructions); -} diff --git a/3rdparty/glsl-optimizer/src/glsl/ir_visitor.h b/3rdparty/glsl-optimizer/src/glsl/ir_visitor.h index 4a00155be..24aabe74e 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ir_visitor.h +++ b/3rdparty/glsl-optimizer/src/glsl/ir_visitor.h @@ -62,6 +62,7 @@ public: virtual void visit(class ir_if *) = 0; virtual void visit(class ir_loop *) = 0; virtual void visit(class ir_loop_jump *) = 0; + virtual void visit(class ir_precision_statement *) = 0; /*@}*/ }; diff --git a/3rdparty/glsl-optimizer/src/glsl/linker.cpp b/3rdparty/glsl-optimizer/src/glsl/linker.cpp index b1a4b8b17..eadc4f580 100644 --- a/3rdparty/glsl-optimizer/src/glsl/linker.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/linker.cpp @@ -875,6 +875,9 @@ move_non_declarations(exec_list *instructions, exec_node *last, if (inst->as_function()) continue; + + if (inst->ir_type == ir_type_precision) + continue; ir_variable *var = inst->as_variable(); if ((var != NULL) && (var->mode != ir_var_temporary)) @@ -1071,8 +1074,8 @@ link_intrastage_shaders(void *mem_ctx, */ ir_function_signature *const main_sig = get_main_function_signature(linked); - /* Move any instructions other than variable declarations or function - * declarations into main. + /* Move any instructions other than variable declarations, function + * declarations or precision statements into main. */ exec_node *insertion_point = move_non_declarations(linked->ir, (exec_node *) &main_sig->body, false, diff --git a/3rdparty/glsl-optimizer/src/glsl/lower_jumps.cpp b/3rdparty/glsl-optimizer/src/glsl/lower_jumps.cpp index 0aafeb1e0..e1ef1fd14 100644 --- a/3rdparty/glsl-optimizer/src/glsl/lower_jumps.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/lower_jumps.cpp @@ -440,6 +440,11 @@ struct ir_lower_jumps_visitor : public ir_control_flow_visitor { */ (void) ir; } + + virtual void visit(class ir_precision_statement * ir) + { + /* Nothing needs to be done. */ + } enum jump_strength get_jump_strength(ir_instruction* ir) { @@ -1002,10 +1007,12 @@ do_lower_jumps(exec_list *instructions, bool pull_out_jumps, bool lower_sub_retu v.lower_sub_return = lower_sub_return; v.lower_main_return = lower_main_return; + bool progress_ever = false; do { v.progress = false; visit_exec_list(instructions, &v); + progress_ever = v.progress || progress_ever; } while (v.progress); - return v.progress; + return progress_ever; } diff --git a/3rdparty/glsl-optimizer/src/glsl/msvc/mesaglsl2.sln b/3rdparty/glsl-optimizer/src/glsl/msvc/mesaglsl2.sln index 013674f4f..06fa8ded8 100644 --- a/3rdparty/glsl-optimizer/src/glsl/msvc/mesaglsl2.sln +++ b/3rdparty/glsl-optimizer/src/glsl/msvc/mesaglsl2.sln @@ -11,17 +11,27 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {B475A403-9D9B-410D-8A93-BA49FC4DD811}.Debug|Win32.ActiveCfg = Debug|Win32 {B475A403-9D9B-410D-8A93-BA49FC4DD811}.Debug|Win32.Build.0 = Debug|Win32 + {B475A403-9D9B-410D-8A93-BA49FC4DD811}.Debug|x64.ActiveCfg = Debug|x64 + {B475A403-9D9B-410D-8A93-BA49FC4DD811}.Debug|x64.Build.0 = Debug|x64 {B475A403-9D9B-410D-8A93-BA49FC4DD811}.Release|Win32.ActiveCfg = Release|Win32 {B475A403-9D9B-410D-8A93-BA49FC4DD811}.Release|Win32.Build.0 = Release|Win32 + {B475A403-9D9B-410D-8A93-BA49FC4DD811}.Release|x64.ActiveCfg = Release|x64 + {B475A403-9D9B-410D-8A93-BA49FC4DD811}.Release|x64.Build.0 = Release|x64 {BB382242-6EBB-445F-989C-B9BA61D17965}.Debug|Win32.ActiveCfg = Debug|Win32 {BB382242-6EBB-445F-989C-B9BA61D17965}.Debug|Win32.Build.0 = Debug|Win32 + {BB382242-6EBB-445F-989C-B9BA61D17965}.Debug|x64.ActiveCfg = Debug|x64 + {BB382242-6EBB-445F-989C-B9BA61D17965}.Debug|x64.Build.0 = Debug|x64 {BB382242-6EBB-445F-989C-B9BA61D17965}.Release|Win32.ActiveCfg = Release|Win32 {BB382242-6EBB-445F-989C-B9BA61D17965}.Release|Win32.Build.0 = Release|Win32 + {BB382242-6EBB-445F-989C-B9BA61D17965}.Release|x64.ActiveCfg = Release|x64 + {BB382242-6EBB-445F-989C-B9BA61D17965}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/3rdparty/glsl-optimizer/src/glsl/msvc/mesaglsl2.vcproj b/3rdparty/glsl-optimizer/src/glsl/msvc/mesaglsl2.vcproj index b91957fe8..79134d194 100644 --- a/3rdparty/glsl-optimizer/src/glsl/msvc/mesaglsl2.vcproj +++ b/3rdparty/glsl-optimizer/src/glsl/msvc/mesaglsl2.vcproj @@ -12,14 +12,17 @@ + @@ -81,10 +84,76 @@ Name="VCPostBuildEventTool" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -208,6 +344,14 @@ Name="VCCustomBuildTool" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + parameters) { + ir_variable *var = (ir_variable *)iter.get(); + if (var->mode == ir_var_in || var->mode == ir_var_const_in || var->mode == ir_var_inout) { + struct assignment_entry *entry; + entry = get_assignment_entry(var, &this->list); + entry->assignment_count++; + } + } + visit_list_elements(this, &ir->body); + return visit_continue_with_parent; +} + + /** * Does a copy propagation pass on the code present in the instruction stream. */ diff --git a/3rdparty/glsl-optimizer/src/glsl/xcode/mesaglsl2.xcodeproj/project.pbxproj b/3rdparty/glsl-optimizer/src/glsl/xcode/mesaglsl2.xcodeproj/project.pbxproj index 0e13cfcca..acc96c69d 100644 --- a/3rdparty/glsl-optimizer/src/glsl/xcode/mesaglsl2.xcodeproj/project.pbxproj +++ b/3rdparty/glsl-optimizer/src/glsl/xcode/mesaglsl2.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 45; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ @@ -258,7 +258,6 @@ 2B6A99EE1223B1670059FBED /* glcpp-parse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "glcpp-parse.c"; path = "../glcpp/glcpp-parse.c"; sourceTree = SOURCE_ROOT; }; 2B6A99EF1223B1670059FBED /* glcpp-parse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "glcpp-parse.h"; path = "../glcpp/glcpp-parse.h"; sourceTree = SOURCE_ROOT; }; 2B6A99F01223B1670059FBED /* glcpp-parse.y */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; name = "glcpp-parse.y"; path = "../glcpp/glcpp-parse.y"; sourceTree = SOURCE_ROOT; }; - 2B6A99F11223B1670059FBED /* glcpp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = glcpp.c; path = ../glcpp/glcpp.c; sourceTree = SOURCE_ROOT; }; 2B6A99F21223B1670059FBED /* glcpp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = glcpp.h; path = ../glcpp/glcpp.h; sourceTree = SOURCE_ROOT; }; 2B6A99F31223B1670059FBED /* pp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pp.c; path = ../glcpp/pp.c; sourceTree = SOURCE_ROOT; }; 2B6AC7B5161EC99C0094FD86 /* prog_instruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = prog_instruction.h; path = ../../mesa/program/prog_instruction.h; sourceTree = SOURCE_ROOT; }; @@ -422,7 +421,6 @@ 2B6A99EE1223B1670059FBED /* glcpp-parse.c */, 2B6A99EF1223B1670059FBED /* glcpp-parse.h */, 2B6A99F01223B1670059FBED /* glcpp-parse.y */, - 2B6A99F11223B1670059FBED /* glcpp.c */, 2B6A99F21223B1670059FBED /* glcpp.h */, 2B6A99F31223B1670059FBED /* pp.c */, ); @@ -663,8 +661,11 @@ /* Begin PBXProject section */ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; + attributes = { + LastUpgradeCheck = 0460; + }; buildConfigurationList = 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "mesaglsl2" */; - compatibilityVersion = "Xcode 3.1"; + compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( @@ -879,9 +880,9 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; INSTALL_PATH = /usr/local/lib; @@ -893,6 +894,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_MODEL_TUNING = G5; INSTALL_PATH = /usr/local/lib; @@ -906,7 +908,7 @@ ARCHS = i386; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; - GCC_VERSION = 4.0; + GCC_VERSION = ""; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -915,9 +917,9 @@ ../../../include, ../../mesa, ); + MACOSX_DEPLOYMENT_TARGET = 10.6; ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = macosx10.4; + SDKROOT = macosx; }; name = Debug; }; @@ -926,7 +928,7 @@ buildSettings = { ARCHS = i386; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = 4.0; + GCC_VERSION = ""; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( @@ -934,8 +936,8 @@ ../../../include, ../../mesa, ); - PREBINDING = NO; - SDKROOT = macosx10.4; + MACOSX_DEPLOYMENT_TARGET = 10.6; + SDKROOT = macosx; }; name = Release; }; @@ -946,11 +948,9 @@ CONFIGURATION_BUILD_DIR = ..; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; INSTALL_PATH = /usr/local/bin; - PREBINDING = NO; PRODUCT_NAME = builtin_compiler; }; name = Debug; @@ -962,10 +962,8 @@ CONFIGURATION_BUILD_DIR = ..; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_MODEL_TUNING = G5; INSTALL_PATH = /usr/local/bin; - PREBINDING = NO; PRODUCT_NAME = builtin_compiler; ZERO_LINK = NO; }; diff --git a/3rdparty/glsl-optimizer/src/mesa/main/mtypes.h b/3rdparty/glsl-optimizer/src/mesa/main/mtypes.h index 05d8220c7..d2ae6db4a 100644 --- a/3rdparty/glsl-optimizer/src/mesa/main/mtypes.h +++ b/3rdparty/glsl-optimizer/src/mesa/main/mtypes.h @@ -1145,6 +1145,7 @@ struct gl_extensions GLboolean EXT_vertex_array_bgra; GLboolean OES_standard_derivatives; GLboolean EXT_shadow_samplers; + GLboolean EXT_frag_depth; /* vendor extensions */ GLboolean AMD_seamless_cubemap_per_texture; GLboolean APPLE_packed_pixels; diff --git a/3rdparty/glsl-optimizer/tests/fragment/bug-const-variable-in.txt b/3rdparty/glsl-optimizer/tests/fragment/bug-const-variable-in.txt new file mode 100644 index 000000000..14e94f70e --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/bug-const-variable-in.txt @@ -0,0 +1,19 @@ +// Used to expose bugs in constant variable optimization, +// when variables were deemed constant not taking into +// account branches or previous dereferences of them. + +uniform float mode; +float func (float c) { + if (mode == 2.0) + return c; + if (mode == 3.0) + discard; + if (mode == 10.0) + c = 0.1; + return c; +} +void main() { + vec4 c = gl_FragCoord; + c.x = func(c.x); + gl_FragColor = c; +} diff --git a/3rdparty/glsl-optimizer/tests/fragment/bug-const-variable-ir.txt b/3rdparty/glsl-optimizer/tests/fragment/bug-const-variable-ir.txt new file mode 100644 index 000000000..710b95a0b --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/bug-const-variable-ir.txt @@ -0,0 +1,35 @@ +uniform float mode; +float func ( + in float c_1 +) +{ + if ((mode == 2.0)) { + return c_1; + }; + if ((mode == 3.0)) { + discard; + }; + if ((mode == 10.0)) { + float tmpvar_2; + tmpvar_2 = 0.1; + c_1 = tmpvar_2; + }; + return c_1; +} + +void main () +{ + vec4 c_3; + vec4 tmpvar_4; + tmpvar_4 = gl_FragCoord; + c_3 = tmpvar_4; + float tmpvar_5; + tmpvar_5 = func (c_3.x); + float tmpvar_6; + tmpvar_6 = tmpvar_5; + c_3.x = tmpvar_6; + vec4 tmpvar_7; + tmpvar_7 = c_3; + gl_FragColor = tmpvar_7; +} + diff --git a/3rdparty/glsl-optimizer/tests/fragment/bug-const-variable-out.txt b/3rdparty/glsl-optimizer/tests/fragment/bug-const-variable-out.txt new file mode 100644 index 000000000..dc43cb632 --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/bug-const-variable-out.txt @@ -0,0 +1,23 @@ +uniform float mode; +void main () +{ + vec4 c_1; + c_1 = gl_FragCoord; + float c_2; + c_2 = gl_FragCoord.x; + float tmpvar_3; + if ((mode == 2.0)) { + tmpvar_3 = c_2; + } else { + if ((mode == 3.0)) { + discard; + }; + if ((mode == 10.0)) { + c_2 = 0.1; + }; + tmpvar_3 = c_2; + }; + c_1.x = tmpvar_3; + gl_FragColor = c_1; +} + diff --git a/3rdparty/glsl-optimizer/tests/fragment/fragdepth-in.txt b/3rdparty/glsl-optimizer/tests/fragment/fragdepth-in.txt new file mode 100644 index 000000000..9e84b4ab6 --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/fragdepth-in.txt @@ -0,0 +1,11 @@ +void xlat_main( out vec4 ocol, out float oz ) { + ocol = vec4( 0.5); + oz = 0.9; +} +void main() { + vec4 xlt_ocol; + float xlt_oz; + xlat_main( xlt_ocol, xlt_oz); + gl_FragData[0] = vec4(xlt_ocol); + gl_FragDepth = float(xlt_oz); +} diff --git a/3rdparty/glsl-optimizer/tests/fragment/fragdepth-inES.txt b/3rdparty/glsl-optimizer/tests/fragment/fragdepth-inES.txt new file mode 100644 index 000000000..59f355f58 --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/fragdepth-inES.txt @@ -0,0 +1,12 @@ +#extension GL_EXT_frag_depth : require +void xlat_main( out lowp vec4 ocol, out mediump float oz ) { + ocol = vec4( 0.5); + oz = 0.9; +} +void main() { + lowp vec4 xlt_ocol; + mediump float xlt_oz; + xlat_main( xlt_ocol, xlt_oz); + gl_FragData[0] = vec4(xlt_ocol); + gl_FragDepthEXT = float(xlt_oz); +} diff --git a/3rdparty/glsl-optimizer/tests/fragment/fragdepth-ir.txt b/3rdparty/glsl-optimizer/tests/fragment/fragdepth-ir.txt new file mode 100644 index 000000000..1b0c26ac9 --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/fragdepth-ir.txt @@ -0,0 +1,28 @@ +void xlat_main ( + out vec4 ocol_1, + out float oz_2 +) +{ + vec4 tmpvar_3; + tmpvar_3 = vec4(0.5, 0.5, 0.5, 0.5); + ocol_1 = tmpvar_3; + float tmpvar_4; + tmpvar_4 = 0.9; + oz_2 = tmpvar_4; +} + +void main () +{ + float xlt_oz_5; + vec4 xlt_ocol_6; + xlat_main (xlt_ocol_6, xlt_oz_5); + vec4 tmpvar_7; + tmpvar_7 = xlt_ocol_6.xyzw; + vec4 tmpvar_8; + tmpvar_8 = tmpvar_7; + gl_FragData[0] = tmpvar_8; + float tmpvar_9; + tmpvar_9 = xlt_oz_5; + gl_FragDepth = tmpvar_9; +} + diff --git a/3rdparty/glsl-optimizer/tests/fragment/fragdepth-irES.txt b/3rdparty/glsl-optimizer/tests/fragment/fragdepth-irES.txt new file mode 100644 index 000000000..ede2574e2 --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/fragdepth-irES.txt @@ -0,0 +1,29 @@ +#extension GL_EXT_frag_depth : enable +void xlat_main ( + out lowp vec4 ocol_1, + out mediump float oz_2 +) +{ + vec4 tmpvar_3; + tmpvar_3 = vec4(0.5, 0.5, 0.5, 0.5); + ocol_1 = tmpvar_3; + float tmpvar_4; + tmpvar_4 = 0.9; + oz_2 = tmpvar_4; +} + +void main () +{ + mediump float xlt_oz_5; + lowp vec4 xlt_ocol_6; + xlat_main (xlt_ocol_6, xlt_oz_5); + lowp vec4 tmpvar_7; + tmpvar_7 = xlt_ocol_6.xyzw; + lowp vec4 tmpvar_8; + tmpvar_8 = tmpvar_7; + gl_FragData[0] = tmpvar_8; + mediump float tmpvar_9; + tmpvar_9 = xlt_oz_5; + gl_FragDepthEXT = tmpvar_9; +} + diff --git a/3rdparty/glsl-optimizer/tests/fragment/fragdepth-out.txt b/3rdparty/glsl-optimizer/tests/fragment/fragdepth-out.txt new file mode 100644 index 000000000..25a3c200a --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/fragdepth-out.txt @@ -0,0 +1,6 @@ +void main () +{ + gl_FragData[0] = vec4(0.5, 0.5, 0.5, 0.5); + gl_FragDepth = 0.9; +} + diff --git a/3rdparty/glsl-optimizer/tests/fragment/fragdepth-outES.txt b/3rdparty/glsl-optimizer/tests/fragment/fragdepth-outES.txt new file mode 100644 index 000000000..cd710f294 --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/fragdepth-outES.txt @@ -0,0 +1,7 @@ +#extension GL_EXT_frag_depth : enable +void main () +{ + gl_FragData[0] = vec4(0.5, 0.5, 0.5, 0.5); + gl_FragDepthEXT = 0.9; +} + diff --git a/3rdparty/glsl-optimizer/tests/fragment/loop-fornounroll-inES.txt b/3rdparty/glsl-optimizer/tests/fragment/loop-fornounroll-inES.txt new file mode 100644 index 000000000..cf8f959af --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/loop-fornounroll-inES.txt @@ -0,0 +1,7 @@ +void main() { + int i = 0; + float f = 0.0; + for (; i < 32; (++i)) + f += gl_FragCoord.x * float(i); + gl_FragColor = vec4(f); +} diff --git a/3rdparty/glsl-optimizer/tests/fragment/loop-fornounroll-irES.txt b/3rdparty/glsl-optimizer/tests/fragment/loop-fornounroll-irES.txt new file mode 100644 index 000000000..e56870605 --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/loop-fornounroll-irES.txt @@ -0,0 +1,28 @@ +void main () +{ + mediump float f_1; + int i_2; + int tmpvar_3; + tmpvar_3 = 0; + i_2 = tmpvar_3; + float tmpvar_4; + tmpvar_4 = 0.0; + f_1 = tmpvar_4; + while (true) { + if (!((i_2 < 32))) { + break; + }; + mediump float tmpvar_5; + tmpvar_5 = (f_1 + (gl_FragCoord.x * float(i_2))); + f_1 = tmpvar_5; + int tmpvar_6; + tmpvar_6 = (i_2 + 1); + i_2 = tmpvar_6; + }; + mediump vec4 tmpvar_7; + tmpvar_7 = vec4(f_1); + mediump vec4 tmpvar_8; + tmpvar_8 = tmpvar_7; + gl_FragColor = tmpvar_8; +} + diff --git a/3rdparty/glsl-optimizer/tests/fragment/loop-fornounroll-outES.txt b/3rdparty/glsl-optimizer/tests/fragment/loop-fornounroll-outES.txt new file mode 100644 index 000000000..55e1d732f --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/loop-fornounroll-outES.txt @@ -0,0 +1,13 @@ +void main () +{ + mediump float f_1; + int i_2; + i_2 = 0; + f_1 = 0.0; + for (int i_2 = 0; i_2 < 32; ) { + f_1 = (f_1 + (gl_FragCoord.x * float(i_2))); + i_2 = (i_2 + 1); + }; + gl_FragColor = vec4(f_1); +} + diff --git a/3rdparty/glsl-optimizer/tests/fragment/prec-default-inES.txt b/3rdparty/glsl-optimizer/tests/fragment/prec-default-inES.txt new file mode 100644 index 000000000..7a122cfd4 --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/prec-default-inES.txt @@ -0,0 +1,17 @@ +precision highp float; +precision lowp int; + +uniform float fh1; +uniform highp float fh2; +uniform mediump float fm; + +uniform int il1; +uniform lowp int il2; +uniform mediump int im; + + +void main() { + lowp float f = fh1 + fh2 + fm; + highp int i = il1 + il2 + im; + gl_FragColor = vec4(f, i, 0.0, 0.0); +} diff --git a/3rdparty/glsl-optimizer/tests/fragment/prec-default-irES.txt b/3rdparty/glsl-optimizer/tests/fragment/prec-default-irES.txt new file mode 100644 index 000000000..434cf79e7 --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/prec-default-irES.txt @@ -0,0 +1,27 @@ +precision lowp int; +precision highp float; +uniform int im; +uniform int il2; +uniform int il1; +uniform mediump float fm; +uniform highp float fh2; +uniform float fh1; +void main () +{ + int i_1; + lowp float f_2; + highp float tmpvar_3; + tmpvar_3 = ((fh1 + fh2) + fm); + f_2 = tmpvar_3; + int tmpvar_4; + tmpvar_4 = ((il1 + il2) + im); + i_1 = tmpvar_4; + highp vec4 tmpvar_5; + tmpvar_5.zw = vec2(0.0, 0.0); + tmpvar_5.x = f_2; + tmpvar_5.y = float(i_1); + highp vec4 tmpvar_6; + tmpvar_6 = tmpvar_5; + gl_FragColor = tmpvar_6; +} + diff --git a/3rdparty/glsl-optimizer/tests/fragment/prec-default-outES.txt b/3rdparty/glsl-optimizer/tests/fragment/prec-default-outES.txt new file mode 100644 index 000000000..d9529c739 --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/prec-default-outES.txt @@ -0,0 +1,25 @@ +precision lowp int; +precision highp float; +uniform int im; +uniform int il2; +uniform int il1; +uniform mediump float fm; +uniform highp float fh2; +uniform float fh1; +void main () +{ + int i_1; + lowp float f_2; + highp float tmpvar_3; + tmpvar_3 = ((fh1 + fh2) + fm); + f_2 = tmpvar_3; + int tmpvar_4; + tmpvar_4 = ((il1 + il2) + im); + i_1 = tmpvar_4; + highp vec4 tmpvar_5; + tmpvar_5.zw = vec2(0.0, 0.0); + tmpvar_5.x = f_2; + tmpvar_5.y = float(i_1); + gl_FragColor = tmpvar_5; +} + diff --git a/3rdparty/glsl-optimizer/tests/fragment/prec-tempssimple-irES.txt b/3rdparty/glsl-optimizer/tests/fragment/prec-tempssimple-irES.txt index 4275100ba..1696073f5 100644 --- a/3rdparty/glsl-optimizer/tests/fragment/prec-tempssimple-irES.txt +++ b/3rdparty/glsl-optimizer/tests/fragment/prec-tempssimple-irES.txt @@ -1,6 +1,6 @@ varying mediump vec2 var_mediump; varying lowp vec2 var_lowp; -uniform sampler2D tex_highp; +uniform highp sampler2D tex_highp; uniform sampler2D tex_lowp; uniform sampler2D tex_def; void main () diff --git a/3rdparty/glsl-optimizer/tests/fragment/prec-tempssimple-outES.txt b/3rdparty/glsl-optimizer/tests/fragment/prec-tempssimple-outES.txt index 564ffe7e4..360c7b9f8 100644 --- a/3rdparty/glsl-optimizer/tests/fragment/prec-tempssimple-outES.txt +++ b/3rdparty/glsl-optimizer/tests/fragment/prec-tempssimple-outES.txt @@ -1,6 +1,6 @@ varying mediump vec2 var_mediump; varying lowp vec2 var_lowp; -uniform sampler2D tex_highp; +uniform highp sampler2D tex_highp; uniform sampler2D tex_lowp; uniform sampler2D tex_def; void main () diff --git a/3rdparty/glsl-optimizer/tests/fragment/sampler-precision-inES.txt b/3rdparty/glsl-optimizer/tests/fragment/sampler-precision-inES.txt new file mode 100644 index 000000000..009b3819c --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/sampler-precision-inES.txt @@ -0,0 +1,23 @@ +uniform sampler2D texlow; +uniform mediump sampler2D texmed; +uniform highp sampler2D texhigh; +uniform samplerCube cubelow; +uniform mediump samplerCube cubemed; +uniform highp samplerCube cubehigh; + +mediump vec4 xlat_main(in highp vec4 uv) { + mediump vec4 c; + c = texture2D(texlow, uv.xy); + c += texture2D(texmed, uv.xy); + c += texture2D(texhigh, uv.xy); + c += textureCube(cubelow, uv.xyz); + c += textureCube(cubemed, uv.xyz); + c += textureCube(cubehigh, uv.xyz); + return c; +} +varying highp vec4 varUV; +void main() { + mediump vec4 r; + r = xlat_main(varUV); + gl_FragData[0] = r; +} diff --git a/3rdparty/glsl-optimizer/tests/fragment/sampler-precision-irES.txt b/3rdparty/glsl-optimizer/tests/fragment/sampler-precision-irES.txt new file mode 100644 index 000000000..b5a14395f --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/sampler-precision-irES.txt @@ -0,0 +1,58 @@ +varying highp vec4 varUV; +uniform highp samplerCube cubehigh; +uniform mediump samplerCube cubemed; +uniform samplerCube cubelow; +uniform highp sampler2D texhigh; +uniform mediump sampler2D texmed; +uniform sampler2D texlow; +mediump vec4 xlat_main ( + in highp vec4 uv_1 +) +{ + mediump vec4 c_2; + lowp vec4 tmpvar_3; + tmpvar_3 = texture2D (texlow, uv_1.xy); + lowp vec4 tmpvar_4; + tmpvar_4 = tmpvar_3; + c_2 = tmpvar_4; + mediump vec4 tmpvar_5; + tmpvar_5 = texture2D (texmed, uv_1.xy); + mediump vec4 tmpvar_6; + tmpvar_6 = (c_2 + tmpvar_5); + c_2 = tmpvar_6; + highp vec4 tmpvar_7; + tmpvar_7 = texture2D (texhigh, uv_1.xy); + highp vec4 tmpvar_8; + tmpvar_8 = (c_2 + tmpvar_7); + c_2 = tmpvar_8; + lowp vec4 tmpvar_9; + tmpvar_9 = textureCube (cubelow, uv_1.xyz); + mediump vec4 tmpvar_10; + tmpvar_10 = (c_2 + tmpvar_9); + c_2 = tmpvar_10; + mediump vec4 tmpvar_11; + tmpvar_11 = textureCube (cubemed, uv_1.xyz); + mediump vec4 tmpvar_12; + tmpvar_12 = (c_2 + tmpvar_11); + c_2 = tmpvar_12; + highp vec4 tmpvar_13; + tmpvar_13 = textureCube (cubehigh, uv_1.xyz); + highp vec4 tmpvar_14; + tmpvar_14 = (c_2 + tmpvar_13); + c_2 = tmpvar_14; + return c_2; +} + +void main () +{ + mediump vec4 r_15; + mediump vec4 tmpvar_16; + tmpvar_16 = xlat_main (varUV); + mediump vec4 tmpvar_17; + tmpvar_17 = tmpvar_16; + r_15 = tmpvar_17; + mediump vec4 tmpvar_18; + tmpvar_18 = r_15; + gl_FragData[0] = tmpvar_18; +} + diff --git a/3rdparty/glsl-optimizer/tests/fragment/sampler-precision-outES.txt b/3rdparty/glsl-optimizer/tests/fragment/sampler-precision-outES.txt new file mode 100644 index 000000000..0e35d3f89 --- /dev/null +++ b/3rdparty/glsl-optimizer/tests/fragment/sampler-precision-outES.txt @@ -0,0 +1,36 @@ +varying highp vec4 varUV; +uniform highp samplerCube cubehigh; +uniform mediump samplerCube cubemed; +uniform samplerCube cubelow; +uniform highp sampler2D texhigh; +uniform mediump sampler2D texmed; +uniform sampler2D texlow; +void main () +{ + mediump vec4 c_1; + lowp vec4 tmpvar_2; + tmpvar_2 = texture2D (texlow, varUV.xy); + c_1 = tmpvar_2; + mediump vec4 tmpvar_3; + tmpvar_3 = texture2D (texmed, varUV.xy); + mediump vec4 tmpvar_4; + tmpvar_4 = (c_1 + tmpvar_3); + highp vec4 tmpvar_5; + tmpvar_5 = texture2D (texhigh, varUV.xy); + highp vec4 tmpvar_6; + tmpvar_6 = (tmpvar_4 + tmpvar_5); + c_1 = tmpvar_6; + lowp vec4 tmpvar_7; + tmpvar_7 = textureCube (cubelow, varUV.xyz); + mediump vec4 tmpvar_8; + tmpvar_8 = textureCube (cubemed, varUV.xyz); + mediump vec4 tmpvar_9; + tmpvar_9 = ((c_1 + tmpvar_7) + tmpvar_8); + highp vec4 tmpvar_10; + tmpvar_10 = textureCube (cubehigh, varUV.xyz); + highp vec4 tmpvar_11; + tmpvar_11 = (tmpvar_9 + tmpvar_10); + c_1 = tmpvar_11; + gl_FragData[0] = c_1; +} + diff --git a/3rdparty/glsl-optimizer/tests/fragment/tex2dlod-inES.txt b/3rdparty/glsl-optimizer/tests/fragment/tex2dlod-inES.txt index f878eeef2..94a1a0bc6 100644 --- a/3rdparty/glsl-optimizer/tests/fragment/tex2dlod-inES.txt +++ b/3rdparty/glsl-optimizer/tests/fragment/tex2dlod-inES.txt @@ -1,6 +1,6 @@ -#extension GL_ARB_shader_texture_lod : require +#extension GL_EXT_shader_texture_lod : require vec4 xll_tex2Dlod(sampler2D s, vec4 coord) { - return texture2DLod( s, coord.xy, coord.w); + return texture2DLodEXT( s, coord.xy, coord.w); } uniform sampler2D tex; mediump vec4 xlat_main( in highp vec4 uv ); diff --git a/3rdparty/glsl-optimizer/tests/fragment/tex2dlod-irES.txt b/3rdparty/glsl-optimizer/tests/fragment/tex2dlod-irES.txt index 308345ae9..f1c10d5fc 100644 --- a/3rdparty/glsl-optimizer/tests/fragment/tex2dlod-irES.txt +++ b/3rdparty/glsl-optimizer/tests/fragment/tex2dlod-irES.txt @@ -1,4 +1,4 @@ -#extension GL_ARB_shader_texture_lod : enable +#extension GL_EXT_shader_texture_lod : enable varying highp vec4 xlv_TEXCOORD0; uniform sampler2D tex; vec4 xll_tex2Dlod ( @@ -7,7 +7,7 @@ vec4 xll_tex2Dlod ( ) { lowp vec4 tmpvar_3; - tmpvar_3 = texture2DLod (s_1, coord_2.xy, coord_2.w); + tmpvar_3 = texture2DLodEXT (s_1, coord_2.xy, coord_2.w); return tmpvar_3; } diff --git a/3rdparty/glsl-optimizer/tests/fragment/tex2dlod-outES.txt b/3rdparty/glsl-optimizer/tests/fragment/tex2dlod-outES.txt index 562560888..21239e329 100644 --- a/3rdparty/glsl-optimizer/tests/fragment/tex2dlod-outES.txt +++ b/3rdparty/glsl-optimizer/tests/fragment/tex2dlod-outES.txt @@ -1,11 +1,11 @@ -#extension GL_ARB_shader_texture_lod : enable +#extension GL_EXT_shader_texture_lod : enable varying highp vec4 xlv_TEXCOORD0; uniform sampler2D tex; void main () { mediump vec4 tmpvar_1; lowp vec4 tmpvar_2; - tmpvar_2 = texture2DLod (tex, xlv_TEXCOORD0.xy, 0.0); + tmpvar_2 = texture2DLodEXT (tex, xlv_TEXCOORD0.xy, 0.0); tmpvar_1 = tmpvar_2; gl_FragData[0] = tmpvar_1; } diff --git a/3rdparty/glsl-optimizer/tests/fragment/texProj-outES.txt b/3rdparty/glsl-optimizer/tests/fragment/texProj-outES.txt index fbe517e2d..75cd06e8c 100644 --- a/3rdparty/glsl-optimizer/tests/fragment/texProj-outES.txt +++ b/3rdparty/glsl-optimizer/tests/fragment/texProj-outES.txt @@ -6,7 +6,7 @@ uniform sampler2D tex; void main () { lowp vec4 tmpvar_1; - tmpvar_1 = (((((texture2DProj (tex, uv) + texture2DProj (tex, uv.xyz)) + texture2DProjLod (tex, uv, 1.0)) + texture2DProjLod (tex, uv.xyz, 1.0)) + vec4(shadow2DEXT (shadowmap, uv.xyz))) + vec4(shadow2DProjEXT (shadowmap, uv))); + tmpvar_1 = (((((texture2DProj (tex, uv) + texture2DProj (tex, uv.xyz)) + texture2DProjLodEXT (tex, uv, 1.0)) + texture2DProjLodEXT (tex, uv.xyz, 1.0)) + vec4(shadow2DEXT (shadowmap, uv.xyz))) + vec4(shadow2DProjEXT (shadowmap, uv))); gl_FragColor = tmpvar_1; } diff --git a/3rdparty/glsl-optimizer/tests/fragment/z-fxaa-preset3-in.txt b/3rdparty/glsl-optimizer/tests/fragment/z-fxaa-preset3-in.txt index ed582b5d0..19721924c 100644 --- a/3rdparty/glsl-optimizer/tests/fragment/z-fxaa-preset3-in.txt +++ b/3rdparty/glsl-optimizer/tests/fragment/z-fxaa-preset3-in.txt @@ -12,169 +12,127 @@ vec3 FxaaFilterReturn( in vec3 rgb ); vec3 FxaaPixelShader( in vec2 pos, in sampler2D tex, in vec2 rcpFrame ); vec4 xlat_main( in vec2 uv ); vec4 FxaaTexOff( in sampler2D tex, in vec2 pos, in vec2 off, in vec2 rcpFrame ) { - return xll_tex2Dlod( tex, vec4( (pos.xy + (off * rcpFrame)), 0.00000, 0.00000)); + return xll_tex2Dlod( tex, vec4( (pos.xy + (off * rcpFrame)), 0.0, 0.0)); } vec4 FxaaTexLod0( in sampler2D tex, in vec2 pos ) { - return xll_tex2Dlod( tex, vec4( pos.xy , 0.00000, 0.00000)); + return xll_tex2Dlod( tex, vec4( pos.xy, 0.0, 0.0)); } float FxaaLuma( in vec3 rgb ) { - return ((rgb.y * 1.96321) + rgb.x ); + return ((rgb.y * (0.587 / 0.299)) + rgb.x); } vec3 FxaaLerp3( in vec3 a, in vec3 b, in float amountOfA ) { - return ((vec3( ( -amountOfA ), ( -amountOfA ), ( -amountOfA )) * b) + ((a * vec3( amountOfA, amountOfA, amountOfA)) + b)); + return ((vec3( (-amountOfA), (-amountOfA), (-amountOfA)) * b) + ((a * vec3( amountOfA, amountOfA, amountOfA)) + b)); } vec3 FxaaFilterReturn( in vec3 rgb ) { return rgb; } vec3 FxaaPixelShader( in vec2 pos, in sampler2D tex, in vec2 rcpFrame ) { - vec3 rgbN; - vec3 rgbW; - vec3 rgbM; - vec3 rgbE; - vec3 rgbS; - float lumaN; - float lumaW; - float lumaM; - float lumaE; - float lumaS; - float rangeMin; - float rangeMax; - float range; - vec3 rgbL; - float lumaL; - float rangeL; - float blendL; - vec3 rgbNW; - vec3 rgbNE; - vec3 rgbSW; - vec3 rgbSE; - float lumaNW; - float lumaNE; - float lumaSW; - float lumaSE; - float edgeVert; - float edgeHorz; - bool horzSpan; - float lengthSign; - float gradientN; - float gradientS; - bool pairN; - vec2 posN; - vec2 posP; - vec2 offNP; - float lumaEndN; - float lumaEndP; - bool doneN = false; - bool doneP = false; - int i = 0; - float dstN; - float dstP; - bool directionN; - float spanLength; - float subPixelOffset; - vec3 rgbF; - rgbN = FxaaTexOff( tex, pos.xy , vec2( 0.00000, -1.00000), rcpFrame).xyz ; - rgbW = FxaaTexOff( tex, pos.xy , vec2( -1.00000, 0.00000), rcpFrame).xyz ; - rgbM = FxaaTexOff( tex, pos.xy , vec2( 0.00000, 0.00000), rcpFrame).xyz ; - rgbE = FxaaTexOff( tex, pos.xy , vec2( 1.00000, 0.00000), rcpFrame).xyz ; - rgbS = FxaaTexOff( tex, pos.xy , vec2( 0.00000, 1.00000), rcpFrame).xyz ; - lumaN = FxaaLuma( rgbN); - lumaW = FxaaLuma( rgbW); - lumaM = FxaaLuma( rgbM); - lumaE = FxaaLuma( rgbE); - lumaS = FxaaLuma( rgbS); - rangeMin = min( lumaM, min( min( lumaN, lumaW), min( lumaS, lumaE))); - rangeMax = max( lumaM, max( max( lumaN, lumaW), max( lumaS, lumaE))); - range = (rangeMax - rangeMin); - if ( (range < max( 0.0416667, (rangeMax * 0.125000))) ){ + vec3 rgbN = FxaaTexOff( tex, pos.xy, vec2( 0.0, -1.0), rcpFrame).xyz; + vec3 rgbW = FxaaTexOff( tex, pos.xy, vec2( -1.0, 0.0), rcpFrame).xyz; + vec3 rgbM = FxaaTexOff( tex, pos.xy, vec2( 0.0, 0.0), rcpFrame).xyz; + vec3 rgbE = FxaaTexOff( tex, pos.xy, vec2( 1.0, 0.0), rcpFrame).xyz; + vec3 rgbS = FxaaTexOff( tex, pos.xy, vec2( 0.0, 1.0), rcpFrame).xyz; + float lumaN = FxaaLuma( rgbN); + float lumaW = FxaaLuma( rgbW); + float lumaM = FxaaLuma( rgbM); + float lumaE = FxaaLuma( rgbE); + float lumaS = FxaaLuma( rgbS); + float rangeMin = min( lumaM, min( min( lumaN, lumaW), min( lumaS, lumaE))); + float rangeMax = max( lumaM, max( max( lumaN, lumaW), max( lumaS, lumaE))); + float range = (rangeMax - rangeMin); + if ((range < max( (1.0 / 24.0), (rangeMax * (1.0 / 8.0))))){ return FxaaFilterReturn( rgbM); } - rgbL = ((((rgbN + rgbW) + rgbM) + rgbE) + rgbS); - lumaL = ((((lumaN + lumaW) + lumaE) + lumaS) * 0.250000); - rangeL = abs( (lumaL - lumaM) ); - blendL = (max( 0.00000, ((rangeL / range) - 0.250000)) * 1.33333); - blendL = min( 0.750000, blendL); - rgbNW = FxaaTexOff( tex, pos.xy , vec2( -1.00000, -1.00000), rcpFrame).xyz ; - rgbNE = FxaaTexOff( tex, pos.xy , vec2( 1.00000, -1.00000), rcpFrame).xyz ; - rgbSW = FxaaTexOff( tex, pos.xy , vec2( -1.00000, 1.00000), rcpFrame).xyz ; - rgbSE = FxaaTexOff( tex, pos.xy , vec2( 1.00000, 1.00000), rcpFrame).xyz ; + vec3 rgbL = ((((rgbN + rgbW) + rgbM) + rgbE) + rgbS); + float lumaL = ((((lumaN + lumaW) + lumaE) + lumaS) * 0.25); + float rangeL = abs((lumaL - lumaM)); + float blendL = (max( 0.0, ((rangeL / range) - (1.0 / 4.0))) * (1.0 / (1.0 - (1.0 / 4.0)))); + blendL = min( (3.0 / 4.0), blendL); + vec3 rgbNW = FxaaTexOff( tex, pos.xy, vec2( -1.0, -1.0), rcpFrame).xyz; + vec3 rgbNE = FxaaTexOff( tex, pos.xy, vec2( 1.0, -1.0), rcpFrame).xyz; + vec3 rgbSW = FxaaTexOff( tex, pos.xy, vec2( -1.0, 1.0), rcpFrame).xyz; + vec3 rgbSE = FxaaTexOff( tex, pos.xy, vec2( 1.0, 1.0), rcpFrame).xyz; rgbL += (((rgbNW + rgbNE) + rgbSW) + rgbSE); - rgbL *= vec3( 0.111111, 0.111111, 0.111111); - lumaNW = FxaaLuma( rgbNW); - lumaNE = FxaaLuma( rgbNE); - lumaSW = FxaaLuma( rgbSW); - lumaSE = FxaaLuma( rgbSE); - edgeVert = ((abs( (((0.250000 * lumaNW) + (-0.500000 * lumaN)) + (0.250000 * lumaNE)) ) + abs( (((0.500000 * lumaW) + (-1.00000 * lumaM)) + (0.500000 * lumaE)) )) + abs( (((0.250000 * lumaSW) + (-0.500000 * lumaS)) + (0.250000 * lumaSE)) )); - edgeHorz = ((abs( (((0.250000 * lumaNW) + (-0.500000 * lumaW)) + (0.250000 * lumaSW)) ) + abs( (((0.500000 * lumaN) + (-1.00000 * lumaM)) + (0.500000 * lumaS)) )) + abs( (((0.250000 * lumaNE) + (-0.500000 * lumaE)) + (0.250000 * lumaSE)) )); - horzSpan = (edgeHorz >= edgeVert); - lengthSign = (( horzSpan ) ? ( ( -rcpFrame.y ) ) : ( ( -rcpFrame.x ) )); - if ( ( !horzSpan ) ){ + rgbL *= vec3( (1.0 / 9.0), (1.0 / 9.0), (1.0 / 9.0)); + float lumaNW = FxaaLuma( rgbNW); + float lumaNE = FxaaLuma( rgbNE); + float lumaSW = FxaaLuma( rgbSW); + float lumaSE = FxaaLuma( rgbSE); + float edgeVert = ((abs((((0.25 * lumaNW) + ((-0.5) * lumaN)) + (0.25 * lumaNE))) + abs((((0.5 * lumaW) + ((-1.0) * lumaM)) + (0.5 * lumaE)))) + abs((((0.25 * lumaSW) + ((-0.5) * lumaS)) + (0.25 * lumaSE)))); + float edgeHorz = ((abs((((0.25 * lumaNW) + ((-0.5) * lumaW)) + (0.25 * lumaSW))) + abs((((0.5 * lumaN) + ((-1.0) * lumaM)) + (0.5 * lumaS)))) + abs((((0.25 * lumaNE) + ((-0.5) * lumaE)) + (0.25 * lumaSE)))); + bool horzSpan = (edgeHorz >= edgeVert); + float lengthSign = (( horzSpan ) ? ( (-rcpFrame.y) ) : ( (-rcpFrame.x) )); + if ((!horzSpan)){ lumaN = lumaW; } - if ( ( !horzSpan ) ){ + if ((!horzSpan)){ lumaS = lumaE; } - gradientN = abs( (lumaN - lumaM) ); - gradientS = abs( (lumaS - lumaM) ); - lumaN = ((lumaN + lumaM) * 0.500000); - lumaS = ((lumaS + lumaM) * 0.500000); - pairN = (gradientN >= gradientS); - if ( ( !pairN ) ){ + float gradientN = abs((lumaN - lumaM)); + float gradientS = abs((lumaS - lumaM)); + lumaN = ((lumaN + lumaM) * 0.5); + lumaS = ((lumaS + lumaM) * 0.5); + bool pairN = (gradientN >= gradientS); + if ((!pairN)){ lumaN = lumaS; } - if ( ( !pairN ) ){ + if ((!pairN)){ gradientN = gradientS; } - if ( ( !pairN ) ){ - lengthSign *= -1.00000; + if ((!pairN)){ + lengthSign *= (-1.0); } - posN.x = (pos.x + (( horzSpan ) ? ( 0.00000 ) : ( (lengthSign * 0.500000) ))); - posN.y = (pos.y + (( horzSpan ) ? ( (lengthSign * 0.500000) ) : ( 0.00000 ))); - gradientN *= 0.250000; - posP = posN; - offNP = (( horzSpan ) ? ( vec2( rcpFrame.x , 0.00000) ) : ( vec2( 0.00000, rcpFrame.y ) )); - lumaEndN = lumaN; - lumaEndP = lumaN; - posN += (offNP * vec2( -1.00000, -1.00000)); - posP += (offNP * vec2( 1.00000, 1.00000)); - for ( ; (i < 16); ( i++ )) { - if ( ( !doneN ) ){ - lumaEndN = FxaaLuma( FxaaTexLod0( tex, posN.xy ).xyz ); + vec2 posN; + posN.x = (pos.x + (( horzSpan ) ? ( 0.0 ) : ( (lengthSign * 0.5) ))); + posN.y = (pos.y + (( horzSpan ) ? ( (lengthSign * 0.5) ) : ( 0.0 ))); + gradientN *= (1.0 / 4.0); + vec2 posP = posN; + vec2 offNP = (( horzSpan ) ? ( vec2( rcpFrame.x, 0.0) ) : ( vec2( 0.0, rcpFrame.y) )); + float lumaEndN = lumaN; + float lumaEndP = lumaN; + bool doneN = false; + bool doneP = false; + posN += (offNP * vec2( (-1.0), (-1.0))); + posP += (offNP * vec2( 1.0, 1.0)); + int i = 0; + for ( ; (i < 16); (i++)) { + if ((!doneN)){ + lumaEndN = FxaaLuma( FxaaTexLod0( tex, posN.xy).xyz); } - if ( ( !doneP ) ){ - lumaEndP = FxaaLuma( FxaaTexLod0( tex, posP.xy ).xyz ); + if ((!doneP)){ + lumaEndP = FxaaLuma( FxaaTexLod0( tex, posP.xy).xyz); } - doneN = (doneN || (abs( (lumaEndN - lumaN) ) >= gradientN)); - doneP = (doneP || (abs( (lumaEndP - lumaN) ) >= gradientN)); - if ( (doneN && doneP) ){ + doneN = (doneN || (abs((lumaEndN - lumaN)) >= gradientN)); + doneP = (doneP || (abs((lumaEndP - lumaN)) >= gradientN)); + if ((doneN && doneP)){ break; } - if ( ( !doneN ) ){ + if ((!doneN)){ posN -= offNP; } - if ( ( !doneP ) ){ + if ((!doneP)){ posP += offNP; } } - dstN = (( horzSpan ) ? ( (pos.x - posN.x ) ) : ( (pos.y - posN.y ) )); - dstP = (( horzSpan ) ? ( (posP.x - pos.x ) ) : ( (posP.y - pos.y ) )); - directionN = (dstN < dstP); + float dstN = (( horzSpan ) ? ( (pos.x - posN.x) ) : ( (pos.y - posN.y) )); + float dstP = (( horzSpan ) ? ( (posP.x - pos.x) ) : ( (posP.y - pos.y) )); + bool directionN = (dstN < dstP); lumaEndN = (( directionN ) ? ( lumaEndN ) : ( lumaEndP )); - if ( (((lumaM - lumaN) < 0.00000) == ((lumaEndN - lumaN) < 0.00000)) ){ - lengthSign = 0.00000; + if ((((lumaM - lumaN) < 0.0) == ((lumaEndN - lumaN) < 0.0))){ + lengthSign = 0.0; } - spanLength = (dstP + dstN); + float spanLength = (dstP + dstN); dstN = (( directionN ) ? ( dstN ) : ( dstP )); - subPixelOffset = ((0.500000 + (dstN * (-1.00000 / spanLength))) * lengthSign); - rgbF = FxaaTexLod0( tex, vec2( (pos.x + (( horzSpan ) ? ( 0.00000 ) : ( subPixelOffset ))), (pos.y + (( horzSpan ) ? ( subPixelOffset ) : ( 0.00000 ))))).xyz ; + float subPixelOffset = ((0.5 + (dstN * ((-1.0) / spanLength))) * lengthSign); + vec3 rgbF = FxaaTexLod0( tex, vec2( (pos.x + (( horzSpan ) ? ( 0.0 ) : ( subPixelOffset ))), (pos.y + (( horzSpan ) ? ( subPixelOffset ) : ( 0.0 ))))).xyz; return FxaaFilterReturn( FxaaLerp3( rgbL, rgbF, blendL)); } vec4 xlat_main( in vec2 uv ) { - return vec4( FxaaPixelShader( uv.xy , _MainTex, _MainTex_TexelSize.xy ).xyz , 0.00000); + return vec4( FxaaPixelShader( uv.xy, _MainTex, _MainTex_TexelSize.xy).xyz, 0.0); } varying vec2 xlv_TEXCOORD0; void main() { vec4 xl_retval; xl_retval = xlat_main( vec2(xlv_TEXCOORD0)); - gl_FragData[0] = vec4( xl_retval); + gl_FragData[0] = vec4(xl_retval); } diff --git a/3rdparty/glsl-optimizer/tests/fragment/z-fxaa-preset3-ir.txt b/3rdparty/glsl-optimizer/tests/fragment/z-fxaa-preset3-ir.txt index 9bcf446af..fac426778 100644 --- a/3rdparty/glsl-optimizer/tests/fragment/z-fxaa-preset3-ir.txt +++ b/3rdparty/glsl-optimizer/tests/fragment/z-fxaa-preset3-ir.txt @@ -44,7 +44,7 @@ float FxaaLuma ( in vec3 rgb_14 ) { - return ((rgb_14.y * 1.96321) + rgb_14.x); + return ((rgb_14.y * (0.587 / 0.299)) + rgb_14.x); } vec3 FxaaLerp3 ( @@ -123,289 +123,289 @@ vec3 FxaaPixelShader ( vec3 rgbM_67; vec3 rgbW_68; vec3 rgbN_69; - bool tmpvar_70; - tmpvar_70 = bool(0); - doneN_32 = tmpvar_70; - bool tmpvar_71; - tmpvar_71 = bool(0); - doneP_31 = tmpvar_71; - int tmpvar_72; - tmpvar_72 = 0; - i_30 = tmpvar_72; - vec4 tmpvar_73; - tmpvar_73 = FxaaTexOff (tex_22, pos_21.xy, vec2(0.0, -1.0), rcpFrame_23); - vec3 tmpvar_74; - tmpvar_74 = tmpvar_73.xyz; - rgbN_69 = tmpvar_74; - vec4 tmpvar_75; - tmpvar_75 = FxaaTexOff (tex_22, pos_21.xy, vec2(-1.0, 0.0), rcpFrame_23); - vec3 tmpvar_76; - tmpvar_76 = tmpvar_75.xyz; - rgbW_68 = tmpvar_76; - vec4 tmpvar_77; - tmpvar_77 = FxaaTexOff (tex_22, pos_21.xy, vec2(0.0, 0.0), rcpFrame_23); - vec3 tmpvar_78; - tmpvar_78 = tmpvar_77.xyz; - rgbM_67 = tmpvar_78; - vec4 tmpvar_79; - tmpvar_79 = FxaaTexOff (tex_22, pos_21.xy, vec2(1.0, 0.0), rcpFrame_23); - vec3 tmpvar_80; - tmpvar_80 = tmpvar_79.xyz; - rgbE_66 = tmpvar_80; - vec4 tmpvar_81; - tmpvar_81 = FxaaTexOff (tex_22, pos_21.xy, vec2(0.0, 1.0), rcpFrame_23); - vec3 tmpvar_82; - tmpvar_82 = tmpvar_81.xyz; - rgbS_65 = tmpvar_82; + vec4 tmpvar_70; + tmpvar_70 = FxaaTexOff (tex_22, pos_21.xy, vec2(0.0, -1.0), rcpFrame_23); + vec3 tmpvar_71; + tmpvar_71 = tmpvar_70.xyz; + rgbN_69 = tmpvar_71; + vec4 tmpvar_72; + tmpvar_72 = FxaaTexOff (tex_22, pos_21.xy, vec2(-1.0, 0.0), rcpFrame_23); + vec3 tmpvar_73; + tmpvar_73 = tmpvar_72.xyz; + rgbW_68 = tmpvar_73; + vec4 tmpvar_74; + tmpvar_74 = FxaaTexOff (tex_22, pos_21.xy, vec2(0.0, 0.0), rcpFrame_23); + vec3 tmpvar_75; + tmpvar_75 = tmpvar_74.xyz; + rgbM_67 = tmpvar_75; + vec4 tmpvar_76; + tmpvar_76 = FxaaTexOff (tex_22, pos_21.xy, vec2(1.0, 0.0), rcpFrame_23); + vec3 tmpvar_77; + tmpvar_77 = tmpvar_76.xyz; + rgbE_66 = tmpvar_77; + vec4 tmpvar_78; + tmpvar_78 = FxaaTexOff (tex_22, pos_21.xy, vec2(0.0, 1.0), rcpFrame_23); + vec3 tmpvar_79; + tmpvar_79 = tmpvar_78.xyz; + rgbS_65 = tmpvar_79; + float tmpvar_80; + tmpvar_80 = FxaaLuma (rgbN_69); + float tmpvar_81; + tmpvar_81 = tmpvar_80; + lumaN_64 = tmpvar_81; + float tmpvar_82; + tmpvar_82 = FxaaLuma (rgbW_68); float tmpvar_83; - tmpvar_83 = FxaaLuma (rgbN_69); + tmpvar_83 = tmpvar_82; + lumaW_63 = tmpvar_83; float tmpvar_84; - tmpvar_84 = tmpvar_83; - lumaN_64 = tmpvar_84; + tmpvar_84 = FxaaLuma (rgbM_67); float tmpvar_85; - tmpvar_85 = FxaaLuma (rgbW_68); + tmpvar_85 = tmpvar_84; + lumaM_62 = tmpvar_85; float tmpvar_86; - tmpvar_86 = tmpvar_85; - lumaW_63 = tmpvar_86; + tmpvar_86 = FxaaLuma (rgbE_66); float tmpvar_87; - tmpvar_87 = FxaaLuma (rgbM_67); + tmpvar_87 = tmpvar_86; + lumaE_61 = tmpvar_87; float tmpvar_88; - tmpvar_88 = tmpvar_87; - lumaM_62 = tmpvar_88; + tmpvar_88 = FxaaLuma (rgbS_65); float tmpvar_89; - tmpvar_89 = FxaaLuma (rgbE_66); + tmpvar_89 = tmpvar_88; + lumaS_60 = tmpvar_89; float tmpvar_90; - tmpvar_90 = tmpvar_89; - lumaE_61 = tmpvar_90; + tmpvar_90 = min (lumaN_64, lumaW_63); float tmpvar_91; - tmpvar_91 = FxaaLuma (rgbS_65); + tmpvar_91 = min (lumaS_60, lumaE_61); float tmpvar_92; - tmpvar_92 = tmpvar_91; - lumaS_60 = tmpvar_92; + tmpvar_92 = min (tmpvar_90, tmpvar_91); float tmpvar_93; - tmpvar_93 = min (lumaN_64, lumaW_63); + tmpvar_93 = min (lumaM_62, tmpvar_92); float tmpvar_94; - tmpvar_94 = min (lumaS_60, lumaE_61); + tmpvar_94 = tmpvar_93; + rangeMin_59 = tmpvar_94; float tmpvar_95; - tmpvar_95 = min (tmpvar_93, tmpvar_94); + tmpvar_95 = max (lumaN_64, lumaW_63); float tmpvar_96; - tmpvar_96 = min (lumaM_62, tmpvar_95); + tmpvar_96 = max (lumaS_60, lumaE_61); float tmpvar_97; - tmpvar_97 = tmpvar_96; - rangeMin_59 = tmpvar_97; + tmpvar_97 = max (tmpvar_95, tmpvar_96); float tmpvar_98; - tmpvar_98 = max (lumaN_64, lumaW_63); + tmpvar_98 = max (lumaM_62, tmpvar_97); float tmpvar_99; - tmpvar_99 = max (lumaS_60, lumaE_61); + tmpvar_99 = tmpvar_98; + rangeMax_58 = tmpvar_99; float tmpvar_100; - tmpvar_100 = max (tmpvar_98, tmpvar_99); + tmpvar_100 = (rangeMax_58 - rangeMin_59); + range_57 = tmpvar_100; float tmpvar_101; - tmpvar_101 = max (lumaM_62, tmpvar_100); - float tmpvar_102; - tmpvar_102 = tmpvar_101; - rangeMax_58 = tmpvar_102; - float tmpvar_103; - tmpvar_103 = (rangeMax_58 - rangeMin_59); - range_57 = tmpvar_103; - float tmpvar_104; - tmpvar_104 = max (0.0416667, (rangeMax_58 * 0.125)); - if ((range_57 < tmpvar_104)) { - vec3 tmpvar_105; - tmpvar_105 = FxaaFilterReturn (rgbM_67); - return tmpvar_105; + tmpvar_101 = max (0.0416667, (rangeMax_58 * (1.0 / 8.0))); + if ((range_57 < tmpvar_101)) { + vec3 tmpvar_102; + tmpvar_102 = FxaaFilterReturn (rgbM_67); + return tmpvar_102; }; - vec3 tmpvar_106; - tmpvar_106 = ((((rgbN_69 + rgbW_68) + rgbM_67) + rgbE_66) + rgbS_65); - rgbL_56 = tmpvar_106; + vec3 tmpvar_103; + tmpvar_103 = ((((rgbN_69 + rgbW_68) + rgbM_67) + rgbE_66) + rgbS_65); + rgbL_56 = tmpvar_103; + float tmpvar_104; + tmpvar_104 = ((((lumaN_64 + lumaW_63) + lumaE_61) + lumaS_60) * 0.25); + lumaL_55 = tmpvar_104; + float tmpvar_105; + tmpvar_105 = abs ((lumaL_55 - lumaM_62)); + float tmpvar_106; + tmpvar_106 = tmpvar_105; + rangeL_54 = tmpvar_106; float tmpvar_107; - tmpvar_107 = ((((lumaN_64 + lumaW_63) + lumaE_61) + lumaS_60) * 0.25); - lumaL_55 = tmpvar_107; + tmpvar_107 = max (0.0, ((rangeL_54 / range_57) - (1.0 / 4.0))); float tmpvar_108; - tmpvar_108 = abs ((lumaL_55 - lumaM_62)); + tmpvar_108 = (tmpvar_107 * (1.0 / (1.0 - (1.0 / 4.0)))); + blendL_53 = tmpvar_108; float tmpvar_109; - tmpvar_109 = tmpvar_108; - rangeL_54 = tmpvar_109; + tmpvar_109 = min (0.75, blendL_53); float tmpvar_110; - tmpvar_110 = max (0.0, ((rangeL_54 / range_57) - 0.25)); - float tmpvar_111; - tmpvar_111 = (tmpvar_110 * 1.33333); - blendL_53 = tmpvar_111; - float tmpvar_112; - tmpvar_112 = min (0.75, blendL_53); - float tmpvar_113; - tmpvar_113 = tmpvar_112; - blendL_53 = tmpvar_113; - vec4 tmpvar_114; - tmpvar_114 = FxaaTexOff (tex_22, pos_21.xy, vec2(-1.0, -1.0), rcpFrame_23); - vec3 tmpvar_115; - tmpvar_115 = tmpvar_114.xyz; - rgbNW_52 = tmpvar_115; - vec4 tmpvar_116; - tmpvar_116 = FxaaTexOff (tex_22, pos_21.xy, vec2(1.0, -1.0), rcpFrame_23); - vec3 tmpvar_117; - tmpvar_117 = tmpvar_116.xyz; - rgbNE_51 = tmpvar_117; - vec4 tmpvar_118; - tmpvar_118 = FxaaTexOff (tex_22, pos_21.xy, vec2(-1.0, 1.0), rcpFrame_23); + tmpvar_110 = tmpvar_109; + blendL_53 = tmpvar_110; + vec4 tmpvar_111; + tmpvar_111 = FxaaTexOff (tex_22, pos_21.xy, vec2(-1.0, -1.0), rcpFrame_23); + vec3 tmpvar_112; + tmpvar_112 = tmpvar_111.xyz; + rgbNW_52 = tmpvar_112; + vec4 tmpvar_113; + tmpvar_113 = FxaaTexOff (tex_22, pos_21.xy, vec2(1.0, -1.0), rcpFrame_23); + vec3 tmpvar_114; + tmpvar_114 = tmpvar_113.xyz; + rgbNE_51 = tmpvar_114; + vec4 tmpvar_115; + tmpvar_115 = FxaaTexOff (tex_22, pos_21.xy, vec2(-1.0, 1.0), rcpFrame_23); + vec3 tmpvar_116; + tmpvar_116 = tmpvar_115.xyz; + rgbSW_50 = tmpvar_116; + vec4 tmpvar_117; + tmpvar_117 = FxaaTexOff (tex_22, pos_21.xy, vec2(1.0, 1.0), rcpFrame_23); + vec3 tmpvar_118; + tmpvar_118 = tmpvar_117.xyz; + rgbSE_49 = tmpvar_118; vec3 tmpvar_119; - tmpvar_119 = tmpvar_118.xyz; - rgbSW_50 = tmpvar_119; - vec4 tmpvar_120; - tmpvar_120 = FxaaTexOff (tex_22, pos_21.xy, vec2(1.0, 1.0), rcpFrame_23); - vec3 tmpvar_121; - tmpvar_121 = tmpvar_120.xyz; - rgbSE_49 = tmpvar_121; - vec3 tmpvar_122; - tmpvar_122 = (rgbL_56 + (((rgbNW_52 + rgbNE_51) + rgbSW_50) + rgbSE_49)); - rgbL_56 = tmpvar_122; - vec3 tmpvar_123; - tmpvar_123 = (rgbL_56 * vec3(0.111111, 0.111111, 0.111111)); - rgbL_56 = tmpvar_123; + tmpvar_119 = (rgbL_56 + (((rgbNW_52 + rgbNE_51) + rgbSW_50) + rgbSE_49)); + rgbL_56 = tmpvar_119; + vec3 tmpvar_120; + tmpvar_120 = (rgbL_56 * vec3(0.111111, 0.111111, 0.111111)); + rgbL_56 = tmpvar_120; + float tmpvar_121; + tmpvar_121 = FxaaLuma (rgbNW_52); + float tmpvar_122; + tmpvar_122 = tmpvar_121; + lumaNW_48 = tmpvar_122; + float tmpvar_123; + tmpvar_123 = FxaaLuma (rgbNE_51); float tmpvar_124; - tmpvar_124 = FxaaLuma (rgbNW_52); + tmpvar_124 = tmpvar_123; + lumaNE_47 = tmpvar_124; float tmpvar_125; - tmpvar_125 = tmpvar_124; - lumaNW_48 = tmpvar_125; + tmpvar_125 = FxaaLuma (rgbSW_50); float tmpvar_126; - tmpvar_126 = FxaaLuma (rgbNE_51); + tmpvar_126 = tmpvar_125; + lumaSW_46 = tmpvar_126; float tmpvar_127; - tmpvar_127 = tmpvar_126; - lumaNE_47 = tmpvar_127; + tmpvar_127 = FxaaLuma (rgbSE_49); float tmpvar_128; - tmpvar_128 = FxaaLuma (rgbSW_50); + tmpvar_128 = tmpvar_127; + lumaSE_45 = tmpvar_128; float tmpvar_129; - tmpvar_129 = tmpvar_128; - lumaSW_46 = tmpvar_129; + tmpvar_129 = abs ((((0.25 * lumaNW_48) + (-(0.5) * lumaN_64)) + (0.25 * lumaNE_47))); float tmpvar_130; - tmpvar_130 = FxaaLuma (rgbSE_49); + tmpvar_130 = abs ((((0.5 * lumaW_63) + (-(1.0) * lumaM_62)) + (0.5 * lumaE_61))); float tmpvar_131; - tmpvar_131 = tmpvar_130; - lumaSE_45 = tmpvar_131; + tmpvar_131 = abs ((((0.25 * lumaSW_46) + (-(0.5) * lumaS_60)) + (0.25 * lumaSE_45))); float tmpvar_132; - tmpvar_132 = abs ((((0.25 * lumaNW_48) + (-(0.5) * lumaN_64)) + (0.25 * lumaNE_47))); + tmpvar_132 = ((tmpvar_129 + tmpvar_130) + tmpvar_131); + edgeVert_44 = tmpvar_132; float tmpvar_133; - tmpvar_133 = abs ((((0.5 * lumaW_63) + (-(1.0) * lumaM_62)) + (0.5 * lumaE_61))); + tmpvar_133 = abs ((((0.25 * lumaNW_48) + (-(0.5) * lumaW_63)) + (0.25 * lumaSW_46))); float tmpvar_134; - tmpvar_134 = abs ((((0.25 * lumaSW_46) + (-(0.5) * lumaS_60)) + (0.25 * lumaSE_45))); + tmpvar_134 = abs ((((0.5 * lumaN_64) + (-(1.0) * lumaM_62)) + (0.5 * lumaS_60))); float tmpvar_135; - tmpvar_135 = ((tmpvar_132 + tmpvar_133) + tmpvar_134); - edgeVert_44 = tmpvar_135; + tmpvar_135 = abs ((((0.25 * lumaNE_47) + (-(0.5) * lumaE_61)) + (0.25 * lumaSE_45))); float tmpvar_136; - tmpvar_136 = abs ((((0.25 * lumaNW_48) + (-(0.5) * lumaW_63)) + (0.25 * lumaSW_46))); - float tmpvar_137; - tmpvar_137 = abs ((((0.5 * lumaN_64) + (-(1.0) * lumaM_62)) + (0.5 * lumaS_60))); + tmpvar_136 = ((tmpvar_133 + tmpvar_134) + tmpvar_135); + edgeHorz_43 = tmpvar_136; + bool tmpvar_137; + tmpvar_137 = (edgeHorz_43 >= edgeVert_44); + horzSpan_42 = tmpvar_137; float tmpvar_138; - tmpvar_138 = abs ((((0.25 * lumaNE_47) + (-(0.5) * lumaE_61)) + (0.25 * lumaSE_45))); - float tmpvar_139; - tmpvar_139 = ((tmpvar_136 + tmpvar_137) + tmpvar_138); - edgeHorz_43 = tmpvar_139; - bool tmpvar_140; - tmpvar_140 = (edgeHorz_43 >= edgeVert_44); - horzSpan_42 = tmpvar_140; - float tmpvar_141; if (horzSpan_42) { - tmpvar_141 = -(rcpFrame_23.y); + tmpvar_138 = -(rcpFrame_23.y); } else { - tmpvar_141 = -(rcpFrame_23.x); + tmpvar_138 = -(rcpFrame_23.x); + }; + float tmpvar_139; + tmpvar_139 = tmpvar_138; + lengthSign_41 = tmpvar_139; + if (!(horzSpan_42)) { + float tmpvar_140; + tmpvar_140 = lumaW_63; + lumaN_64 = tmpvar_140; + }; + if (!(horzSpan_42)) { + float tmpvar_141; + tmpvar_141 = lumaE_61; + lumaS_60 = tmpvar_141; }; float tmpvar_142; - tmpvar_142 = tmpvar_141; - lengthSign_41 = tmpvar_142; - if (!(horzSpan_42)) { - float tmpvar_143; - tmpvar_143 = lumaW_63; - lumaN_64 = tmpvar_143; - }; - if (!(horzSpan_42)) { - float tmpvar_144; - tmpvar_144 = lumaE_61; - lumaS_60 = tmpvar_144; - }; + tmpvar_142 = abs ((lumaN_64 - lumaM_62)); + float tmpvar_143; + tmpvar_143 = tmpvar_142; + gradientN_40 = tmpvar_143; + float tmpvar_144; + tmpvar_144 = abs ((lumaS_60 - lumaM_62)); float tmpvar_145; - tmpvar_145 = abs ((lumaN_64 - lumaM_62)); + tmpvar_145 = tmpvar_144; + gradientS_39 = tmpvar_145; float tmpvar_146; - tmpvar_146 = tmpvar_145; - gradientN_40 = tmpvar_146; + tmpvar_146 = ((lumaN_64 + lumaM_62) * 0.5); + lumaN_64 = tmpvar_146; float tmpvar_147; - tmpvar_147 = abs ((lumaS_60 - lumaM_62)); - float tmpvar_148; - tmpvar_148 = tmpvar_147; - gradientS_39 = tmpvar_148; - float tmpvar_149; - tmpvar_149 = ((lumaN_64 + lumaM_62) * 0.5); - lumaN_64 = tmpvar_149; - float tmpvar_150; - tmpvar_150 = ((lumaS_60 + lumaM_62) * 0.5); - lumaS_60 = tmpvar_150; - bool tmpvar_151; - tmpvar_151 = (gradientN_40 >= gradientS_39); - pairN_38 = tmpvar_151; + tmpvar_147 = ((lumaS_60 + lumaM_62) * 0.5); + lumaS_60 = tmpvar_147; + bool tmpvar_148; + tmpvar_148 = (gradientN_40 >= gradientS_39); + pairN_38 = tmpvar_148; if (!(pairN_38)) { - float tmpvar_152; - tmpvar_152 = lumaS_60; - lumaN_64 = tmpvar_152; + float tmpvar_149; + tmpvar_149 = lumaS_60; + lumaN_64 = tmpvar_149; }; if (!(pairN_38)) { - float tmpvar_153; - tmpvar_153 = gradientS_39; - gradientN_40 = tmpvar_153; + float tmpvar_150; + tmpvar_150 = gradientS_39; + gradientN_40 = tmpvar_150; }; if (!(pairN_38)) { - float tmpvar_154; - tmpvar_154 = (lengthSign_41 * -(1.0)); - lengthSign_41 = tmpvar_154; + float tmpvar_151; + tmpvar_151 = (lengthSign_41 * -(1.0)); + lengthSign_41 = tmpvar_151; + }; + float tmpvar_152; + if (horzSpan_42) { + tmpvar_152 = 0.0; + } else { + tmpvar_152 = (lengthSign_41 * 0.5); + }; + float tmpvar_153; + tmpvar_153 = (pos_21.x + tmpvar_152); + posN_37.x = tmpvar_153; + float tmpvar_154; + if (horzSpan_42) { + tmpvar_154 = (lengthSign_41 * 0.5); + } else { + tmpvar_154 = 0.0; }; float tmpvar_155; - if (horzSpan_42) { - tmpvar_155 = 0.0; - } else { - tmpvar_155 = (lengthSign_41 * 0.5); - }; + tmpvar_155 = (pos_21.y + tmpvar_154); + posN_37.y = vec2(tmpvar_155).y; float tmpvar_156; - tmpvar_156 = (pos_21.x + tmpvar_155); - posN_37.x = tmpvar_156; - float tmpvar_157; + tmpvar_156 = (gradientN_40 * (1.0 / 4.0)); + gradientN_40 = tmpvar_156; + vec2 tmpvar_157; + tmpvar_157 = posN_37; + posP_36 = tmpvar_157; + vec2 tmpvar_158; if (horzSpan_42) { - tmpvar_157 = (lengthSign_41 * 0.5); + vec2 tmpvar_159; + tmpvar_159.y = 0.0; + tmpvar_159.x = rcpFrame_23.x; + tmpvar_158 = tmpvar_159; } else { - tmpvar_157 = 0.0; + vec2 tmpvar_160; + tmpvar_160.x = 0.0; + tmpvar_160.y = rcpFrame_23.y; + tmpvar_158 = tmpvar_160; }; - float tmpvar_158; - tmpvar_158 = (pos_21.y + tmpvar_157); - posN_37.y = vec2(tmpvar_158).y; - float tmpvar_159; - tmpvar_159 = (gradientN_40 * 0.25); - gradientN_40 = tmpvar_159; - vec2 tmpvar_160; - tmpvar_160 = posN_37; - posP_36 = tmpvar_160; vec2 tmpvar_161; - if (horzSpan_42) { - vec2 tmpvar_162; - tmpvar_162.y = 0.0; - tmpvar_162.x = rcpFrame_23.x; - tmpvar_161 = tmpvar_162; - } else { - vec2 tmpvar_163; - tmpvar_163.x = 0.0; - tmpvar_163.y = rcpFrame_23.y; - tmpvar_161 = tmpvar_163; - }; - vec2 tmpvar_164; - tmpvar_164 = tmpvar_161; - offNP_35 = tmpvar_164; - float tmpvar_165; - tmpvar_165 = lumaN_64; - lumaEndN_34 = tmpvar_165; - float tmpvar_166; - tmpvar_166 = lumaN_64; - lumaEndP_33 = tmpvar_166; + tmpvar_161 = tmpvar_158; + offNP_35 = tmpvar_161; + float tmpvar_162; + tmpvar_162 = lumaN_64; + lumaEndN_34 = tmpvar_162; + float tmpvar_163; + tmpvar_163 = lumaN_64; + lumaEndP_33 = tmpvar_163; + bool tmpvar_164; + tmpvar_164 = bool(0); + doneN_32 = tmpvar_164; + bool tmpvar_165; + tmpvar_165 = bool(0); + doneP_31 = tmpvar_165; + vec2 tmpvar_166; + tmpvar_166 = (posN_37 + (offNP_35 * vec2(-1.0, -1.0))); + posN_37 = tmpvar_166; vec2 tmpvar_167; - tmpvar_167 = (posN_37 + (offNP_35 * vec2(-1.0, -1.0))); - posN_37 = tmpvar_167; - vec2 tmpvar_168; - tmpvar_168 = (posP_36 + (offNP_35 * vec2(1.0, 1.0))); - posP_36 = tmpvar_168; + tmpvar_167 = (posP_36 + (offNP_35 * vec2(1.0, 1.0))); + posP_36 = tmpvar_167; + int tmpvar_168; + tmpvar_168 = 0; + i_30 = tmpvar_168; while (true) { if (!((i_30 < 16))) { break; diff --git a/3rdparty/glsl-optimizer/tests/fragment/z-fxaa-preset3-out.txt b/3rdparty/glsl-optimizer/tests/fragment/z-fxaa-preset3-out.txt index 53ae4c970..5f19016ec 100644 --- a/3rdparty/glsl-optimizer/tests/fragment/z-fxaa-preset3-out.txt +++ b/3rdparty/glsl-optimizer/tests/fragment/z-fxaa-preset3-out.txt @@ -19,9 +19,6 @@ void main () float lengthSign_12; float lumaS_13; float lumaN_14; - doneN_5 = bool(0); - doneP_4 = bool(0); - i_3 = 0; vec4 tmpvar_15; tmpvar_15.zw = vec2(0.0, 0.0); tmpvar_15.xy = (xlv_TEXCOORD0 + (vec2(0.0, -1.0) * _MainTex_TexelSize.xy)); @@ -163,12 +160,12 @@ void main () offNP_8 = tmpvar_54; lumaEndN_7 = lumaN_14; lumaEndP_6 = lumaN_14; + doneN_5 = bool(0); + doneP_4 = bool(0); posN_10 = (posN_10 + (tmpvar_54 * vec2(-1.0, -1.0))); posP_9 = (posP_9 + tmpvar_54); - while (true) { - if ((i_3 >= 16)) { - break; - }; + i_3 = 0; + for (int i_3 = 0; i_3 < 16; ) { if (!(doneN_5)) { vec4 tmpvar_57; tmpvar_57 = texture2DLod (_MainTex, posN_10, 0.0); diff --git a/3rdparty/glsl-optimizer/tests/fragment/z-fxaa3-11-consolepc-outES.txt b/3rdparty/glsl-optimizer/tests/fragment/z-fxaa3-11-consolepc-outES.txt index 4ca984ef3..15bc3fb02 100644 --- a/3rdparty/glsl-optimizer/tests/fragment/z-fxaa3-11-consolepc-outES.txt +++ b/3rdparty/glsl-optimizer/tests/fragment/z-fxaa3-11-consolepc-outES.txt @@ -14,23 +14,23 @@ void main () highp vec2 dir_5; highp float lumaM_6; lowp vec4 tmpvar_7; - tmpvar_7 = texture2DLod (_MainTex, xlv_TEXCOORD1.xy, 0.0); + tmpvar_7 = texture2DLodEXT (_MainTex, xlv_TEXCOORD1.xy, 0.0); highp float tmpvar_8; tmpvar_8 = tmpvar_7.y; lowp vec4 tmpvar_9; - tmpvar_9 = texture2DLod (_MainTex, xlv_TEXCOORD1.xw, 0.0); + tmpvar_9 = texture2DLodEXT (_MainTex, xlv_TEXCOORD1.xw, 0.0); highp float tmpvar_10; tmpvar_10 = tmpvar_9.y; lowp vec4 tmpvar_11; - tmpvar_11 = texture2DLod (_MainTex, xlv_TEXCOORD1.zy, 0.0); + tmpvar_11 = texture2DLodEXT (_MainTex, xlv_TEXCOORD1.zy, 0.0); highp float tmpvar_12; tmpvar_12 = tmpvar_11.y; lowp vec4 tmpvar_13; - tmpvar_13 = texture2DLod (_MainTex, xlv_TEXCOORD1.zw, 0.0); + tmpvar_13 = texture2DLodEXT (_MainTex, xlv_TEXCOORD1.zw, 0.0); highp float tmpvar_14; tmpvar_14 = tmpvar_13.y; lowp vec4 tmpvar_15; - tmpvar_15 = texture2DLod (_MainTex, xlv_TEXCOORD0, 0.0); + tmpvar_15 = texture2DLodEXT (_MainTex, xlv_TEXCOORD0, 0.0); lowp float tmpvar_16; tmpvar_16 = tmpvar_15.y; lumaM_6 = tmpvar_16; @@ -70,9 +70,9 @@ void main () tmpvar_29.zw = vec2(0.0, 0.0); tmpvar_29.xy = (xlv_TEXCOORD0 + (tmpvar_27 * fxaaConsoleRcpFrameOpt2_2.zw)); lowp vec4 tmpvar_30; - tmpvar_30 = (texture2DLod (_MainTex, tmpvar_25.xy, 0.0) + texture2DLod (_MainTex, tmpvar_26.xy, 0.0)); + tmpvar_30 = (texture2DLodEXT (_MainTex, tmpvar_25.xy, 0.0) + texture2DLodEXT (_MainTex, tmpvar_26.xy, 0.0)); lowp vec4 tmpvar_31; - tmpvar_31 = (((texture2DLod (_MainTex, tmpvar_28.xy, 0.0) + texture2DLod (_MainTex, tmpvar_29.xy, 0.0)) * 0.25) + (tmpvar_30 * 0.25)); + tmpvar_31 = (((texture2DLodEXT (_MainTex, tmpvar_28.xy, 0.0) + texture2DLodEXT (_MainTex, tmpvar_29.xy, 0.0)) * 0.25) + (tmpvar_30 * 0.25)); rgbyB_4 = tmpvar_31; if (((tmpvar_31.y < tmpvar_19) || (tmpvar_31.y > tmpvar_18))) { rgbyB_4.xyz = (tmpvar_30.xyz * 0.5); diff --git a/3rdparty/glsl-optimizer/tests/fragment/z-fxaa3-11-pc39-outES.txt b/3rdparty/glsl-optimizer/tests/fragment/z-fxaa3-11-pc39-outES.txt index 624bb2d25..4ed63efd8 100644 --- a/3rdparty/glsl-optimizer/tests/fragment/z-fxaa3-11-pc39-outES.txt +++ b/3rdparty/glsl-optimizer/tests/fragment/z-fxaa3-11-pc39-outES.txt @@ -23,13 +23,13 @@ void main () posM_15.x = xlv_TEXCOORD0.x; posM_15.y = xlv_TEXCOORD0.y; lowp vec4 tmpvar_16; - tmpvar_16 = texture2DLod (_MainTex, xlv_TEXCOORD0, 0.0); + tmpvar_16 = texture2DLodEXT (_MainTex, xlv_TEXCOORD0, 0.0); rgbyM_14 = tmpvar_16; highp vec4 tmpvar_17; tmpvar_17.zw = vec2(0.0, 0.0); tmpvar_17.xy = (xlv_TEXCOORD0 + (vec2(0.0, 1.0) * _MainTex_TexelSize.xy)); lowp vec4 tmpvar_18; - tmpvar_18 = texture2DLod (_MainTex, tmpvar_17.xy, 0.0); + tmpvar_18 = texture2DLodEXT (_MainTex, tmpvar_17.xy, 0.0); highp vec4 rgba_19; rgba_19 = tmpvar_18; lumaS_13 = rgba_19.w; @@ -37,7 +37,7 @@ void main () tmpvar_20.zw = vec2(0.0, 0.0); tmpvar_20.xy = (xlv_TEXCOORD0 + (vec2(1.0, 0.0) * _MainTex_TexelSize.xy)); lowp vec4 tmpvar_21; - tmpvar_21 = texture2DLod (_MainTex, tmpvar_20.xy, 0.0); + tmpvar_21 = texture2DLodEXT (_MainTex, tmpvar_20.xy, 0.0); highp float tmpvar_22; highp vec4 rgba_23; rgba_23 = tmpvar_21; @@ -46,7 +46,7 @@ void main () tmpvar_24.zw = vec2(0.0, 0.0); tmpvar_24.xy = (xlv_TEXCOORD0 + (vec2(0.0, -1.0) * _MainTex_TexelSize.xy)); lowp vec4 tmpvar_25; - tmpvar_25 = texture2DLod (_MainTex, tmpvar_24.xy, 0.0); + tmpvar_25 = texture2DLodEXT (_MainTex, tmpvar_24.xy, 0.0); highp vec4 rgba_26; rgba_26 = tmpvar_25; lumaN_12 = rgba_26.w; @@ -54,7 +54,7 @@ void main () tmpvar_27.zw = vec2(0.0, 0.0); tmpvar_27.xy = (xlv_TEXCOORD0 + (vec2(-1.0, 0.0) * _MainTex_TexelSize.xy)); lowp vec4 tmpvar_28; - tmpvar_28 = texture2DLod (_MainTex, tmpvar_27.xy, 0.0); + tmpvar_28 = texture2DLodEXT (_MainTex, tmpvar_27.xy, 0.0); highp float tmpvar_29; highp vec4 rgba_30; rgba_30 = tmpvar_28; @@ -70,28 +70,28 @@ void main () tmpvar_33.zw = vec2(0.0, 0.0); tmpvar_33.xy = (xlv_TEXCOORD0 + (vec2(-1.0, -1.0) * _MainTex_TexelSize.xy)); lowp vec4 tmpvar_34; - tmpvar_34 = texture2DLod (_MainTex, tmpvar_33.xy, 0.0); + tmpvar_34 = texture2DLodEXT (_MainTex, tmpvar_33.xy, 0.0); highp vec4 rgba_35; rgba_35 = tmpvar_34; highp vec4 tmpvar_36; tmpvar_36.zw = vec2(0.0, 0.0); tmpvar_36.xy = (xlv_TEXCOORD0 + _MainTex_TexelSize.xy); lowp vec4 tmpvar_37; - tmpvar_37 = texture2DLod (_MainTex, tmpvar_36.xy, 0.0); + tmpvar_37 = texture2DLodEXT (_MainTex, tmpvar_36.xy, 0.0); highp vec4 rgba_38; rgba_38 = tmpvar_37; highp vec4 tmpvar_39; tmpvar_39.zw = vec2(0.0, 0.0); tmpvar_39.xy = (xlv_TEXCOORD0 + (vec2(1.0, -1.0) * _MainTex_TexelSize.xy)); lowp vec4 tmpvar_40; - tmpvar_40 = texture2DLod (_MainTex, tmpvar_39.xy, 0.0); + tmpvar_40 = texture2DLodEXT (_MainTex, tmpvar_39.xy, 0.0); highp vec4 rgba_41; rgba_41 = tmpvar_40; highp vec4 tmpvar_42; tmpvar_42.zw = vec2(0.0, 0.0); tmpvar_42.xy = (xlv_TEXCOORD0 + (vec2(-1.0, 1.0) * _MainTex_TexelSize.xy)); lowp vec4 tmpvar_43; - tmpvar_43 = texture2DLod (_MainTex, tmpvar_42.xy, 0.0); + tmpvar_43 = texture2DLodEXT (_MainTex, tmpvar_42.xy, 0.0); highp vec4 rgba_44; rgba_44 = tmpvar_43; highp float tmpvar_45; @@ -163,14 +163,14 @@ void main () highp float tmpvar_61; tmpvar_61 = ((-2.0 * tmpvar_58) + 3.0); lowp vec4 tmpvar_62; - tmpvar_62 = texture2DLod (_MainTex, posN_8, 0.0); + tmpvar_62 = texture2DLodEXT (_MainTex, posN_8, 0.0); highp vec4 rgba_63; rgba_63 = tmpvar_62; lumaEndN_6 = rgba_63.w; highp float tmpvar_64; tmpvar_64 = (tmpvar_58 * tmpvar_58); lowp vec4 tmpvar_65; - tmpvar_65 = texture2DLod (_MainTex, posP_7, 0.0); + tmpvar_65 = texture2DLodEXT (_MainTex, posP_7, 0.0); highp vec4 rgba_66; rgba_66 = tmpvar_65; lumaEndP_5 = rgba_66.w; @@ -210,14 +210,14 @@ void main () if (tmpvar_74) { if (!(tmpvar_72)) { lowp vec4 tmpvar_75; - tmpvar_75 = texture2DLod (_MainTex, posN_8, 0.0); + tmpvar_75 = texture2DLodEXT (_MainTex, posN_8, 0.0); highp vec4 rgba_76; rgba_76 = tmpvar_75; lumaEndN_6 = rgba_76.w; }; if (!(tmpvar_73)) { lowp vec4 tmpvar_77; - tmpvar_77 = texture2DLod (_MainTex, posP_7, 0.0); + tmpvar_77 = texture2DLodEXT (_MainTex, posP_7, 0.0); highp vec4 rgba_78; rgba_78 = tmpvar_77; lumaEndP_5 = rgba_78.w; @@ -249,14 +249,14 @@ void main () if (tmpvar_81) { if (!(tmpvar_79)) { lowp vec4 tmpvar_82; - tmpvar_82 = texture2DLod (_MainTex, posN_8, 0.0); + tmpvar_82 = texture2DLodEXT (_MainTex, posN_8, 0.0); highp vec4 rgba_83; rgba_83 = tmpvar_82; lumaEndN_6 = rgba_83.w; }; if (!(tmpvar_80)) { lowp vec4 tmpvar_84; - tmpvar_84 = texture2DLod (_MainTex, posP_7, 0.0); + tmpvar_84 = texture2DLodEXT (_MainTex, posP_7, 0.0); highp vec4 rgba_85; rgba_85 = tmpvar_84; lumaEndP_5 = rgba_85.w; @@ -288,14 +288,14 @@ void main () if (tmpvar_88) { if (!(tmpvar_86)) { lowp vec4 tmpvar_89; - tmpvar_89 = texture2DLod (_MainTex, posN_8, 0.0); + tmpvar_89 = texture2DLodEXT (_MainTex, posN_8, 0.0); highp vec4 rgba_90; rgba_90 = tmpvar_89; lumaEndN_6 = rgba_90.w; }; if (!(tmpvar_87)) { lowp vec4 tmpvar_91; - tmpvar_91 = texture2DLod (_MainTex, posP_7, 0.0); + tmpvar_91 = texture2DLodEXT (_MainTex, posP_7, 0.0); highp vec4 rgba_92; rgba_92 = tmpvar_91; lumaEndP_5 = rgba_92.w; @@ -327,14 +327,14 @@ void main () if (tmpvar_95) { if (!(tmpvar_93)) { lowp vec4 tmpvar_96; - tmpvar_96 = texture2DLod (_MainTex, posN_8, 0.0); + tmpvar_96 = texture2DLodEXT (_MainTex, posN_8, 0.0); highp vec4 rgba_97; rgba_97 = tmpvar_96; lumaEndN_6 = rgba_97.w; }; if (!(tmpvar_94)) { lowp vec4 tmpvar_98; - tmpvar_98 = texture2DLod (_MainTex, posP_7, 0.0); + tmpvar_98 = texture2DLodEXT (_MainTex, posP_7, 0.0); highp vec4 rgba_99; rgba_99 = tmpvar_98; lumaEndP_5 = rgba_99.w; @@ -366,14 +366,14 @@ void main () if (tmpvar_102) { if (!(tmpvar_100)) { lowp vec4 tmpvar_103; - tmpvar_103 = texture2DLod (_MainTex, posN_8, 0.0); + tmpvar_103 = texture2DLodEXT (_MainTex, posN_8, 0.0); highp vec4 rgba_104; rgba_104 = tmpvar_103; lumaEndN_6 = rgba_104.w; }; if (!(tmpvar_101)) { lowp vec4 tmpvar_105; - tmpvar_105 = texture2DLod (_MainTex, posP_7, 0.0); + tmpvar_105 = texture2DLodEXT (_MainTex, posP_7, 0.0); highp vec4 rgba_106; rgba_106 = tmpvar_105; lumaEndP_5 = rgba_106.w; @@ -405,14 +405,14 @@ void main () if (tmpvar_109) { if (!(tmpvar_107)) { lowp vec4 tmpvar_110; - tmpvar_110 = texture2DLod (_MainTex, posN_8, 0.0); + tmpvar_110 = texture2DLodEXT (_MainTex, posN_8, 0.0); highp vec4 rgba_111; rgba_111 = tmpvar_110; lumaEndN_6 = rgba_111.w; }; if (!(tmpvar_108)) { lowp vec4 tmpvar_112; - tmpvar_112 = texture2DLod (_MainTex, posP_7, 0.0); + tmpvar_112 = texture2DLodEXT (_MainTex, posP_7, 0.0); highp vec4 rgba_113; rgba_113 = tmpvar_112; lumaEndP_5 = rgba_113.w; @@ -444,14 +444,14 @@ void main () if (tmpvar_116) { if (!(tmpvar_114)) { lowp vec4 tmpvar_117; - tmpvar_117 = texture2DLod (_MainTex, posN_8, 0.0); + tmpvar_117 = texture2DLodEXT (_MainTex, posN_8, 0.0); highp vec4 rgba_118; rgba_118 = tmpvar_117; lumaEndN_6 = rgba_118.w; }; if (!(tmpvar_115)) { lowp vec4 tmpvar_119; - tmpvar_119 = texture2DLod (_MainTex, posP_7, 0.0); + tmpvar_119 = texture2DLodEXT (_MainTex, posP_7, 0.0); highp vec4 rgba_120; rgba_120 = tmpvar_119; lumaEndP_5 = rgba_120.w; @@ -483,14 +483,14 @@ void main () if (tmpvar_123) { if (!(tmpvar_121)) { lowp vec4 tmpvar_124; - tmpvar_124 = texture2DLod (_MainTex, posN_8, 0.0); + tmpvar_124 = texture2DLodEXT (_MainTex, posN_8, 0.0); highp vec4 rgba_125; rgba_125 = tmpvar_124; lumaEndN_6 = rgba_125.w; }; if (!(tmpvar_122)) { lowp vec4 tmpvar_126; - tmpvar_126 = texture2DLod (_MainTex, posP_7, 0.0); + tmpvar_126 = texture2DLodEXT (_MainTex, posP_7, 0.0); highp vec4 rgba_127; rgba_127 = tmpvar_126; lumaEndP_5 = rgba_127.w; @@ -522,14 +522,14 @@ void main () if (tmpvar_130) { if (!(tmpvar_128)) { lowp vec4 tmpvar_131; - tmpvar_131 = texture2DLod (_MainTex, posN_8, 0.0); + tmpvar_131 = texture2DLodEXT (_MainTex, posN_8, 0.0); highp vec4 rgba_132; rgba_132 = tmpvar_131; lumaEndN_6 = rgba_132.w; }; if (!(tmpvar_129)) { lowp vec4 tmpvar_133; - tmpvar_133 = texture2DLod (_MainTex, posP_7, 0.0); + tmpvar_133 = texture2DLodEXT (_MainTex, posP_7, 0.0); highp vec4 rgba_134; rgba_134 = tmpvar_133; lumaEndP_5 = rgba_134.w; @@ -561,14 +561,14 @@ void main () if (tmpvar_137) { if (!(tmpvar_135)) { lowp vec4 tmpvar_138; - tmpvar_138 = texture2DLod (_MainTex, posN_8, 0.0); + tmpvar_138 = texture2DLodEXT (_MainTex, posN_8, 0.0); highp vec4 rgba_139; rgba_139 = tmpvar_138; lumaEndN_6 = rgba_139.w; }; if (!(tmpvar_136)) { lowp vec4 tmpvar_140; - tmpvar_140 = texture2DLod (_MainTex, posP_7, 0.0); + tmpvar_140 = texture2DLodEXT (_MainTex, posP_7, 0.0); highp vec4 rgba_141; rgba_141 = tmpvar_140; lumaEndP_5 = rgba_141.w; @@ -646,7 +646,7 @@ void main () posM_15.y = (xlv_TEXCOORD0.y + (tmpvar_152 * lengthSign_11)); }; lowp vec4 tmpvar_153; - tmpvar_153 = texture2DLod (_MainTex, posM_15, 0.0); + tmpvar_153 = texture2DLodEXT (_MainTex, posM_15, 0.0); highp vec4 tmpvar_154; tmpvar_154.xyz = tmpvar_153.xyz; tmpvar_154.w = rgbyM_14.w; diff --git a/3rdparty/glsl-optimizer/tests/glsl-optimizer-tests.xcodeproj/project.pbxproj b/3rdparty/glsl-optimizer/tests/glsl-optimizer-tests.xcodeproj/project.pbxproj index 5154e3e47..944803ff6 100644 --- a/3rdparty/glsl-optimizer/tests/glsl-optimizer-tests.xcodeproj/project.pbxproj +++ b/3rdparty/glsl-optimizer/tests/glsl-optimizer-tests.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 45; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ @@ -135,8 +135,11 @@ /* Begin PBXProject section */ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; + attributes = { + LastUpgradeCheck = 0460; + }; buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "glsl-optimizer-tests" */; - compatibilityVersion = "Xcode 3.1"; + compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( @@ -203,7 +206,6 @@ ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; INSTALL_PATH = /usr/local/bin; @@ -228,12 +230,12 @@ ARCHS = i386; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; - GCC_VERSION = 4.0; + GCC_VERSION = ""; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.6; ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = macosx10.4; + SDKROOT = macosx; }; name = Debug; }; @@ -242,15 +244,15 @@ buildSettings = { ARCHS = i386; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = 4.0; + GCC_VERSION = ""; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; GCC_WARN_PROTOTYPE_CONVERSION = YES; GCC_WARN_SHADOW = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = macosx10.4; + MACOSX_DEPLOYMENT_TARGET = 10.6; + SDKROOT = macosx; }; name = Release; }; diff --git a/3rdparty/glsl-optimizer/tests/glsl_optimizer_tests.cpp b/3rdparty/glsl-optimizer/tests/glsl_optimizer_tests.cpp index 47e3aaa40..370ea4378 100644 --- a/3rdparty/glsl-optimizer/tests/glsl_optimizer_tests.cpp +++ b/3rdparty/glsl-optimizer/tests/glsl_optimizer_tests.cpp @@ -156,6 +156,7 @@ static bool CheckGLSL (bool vertex, bool gles, const std::string& testName, cons src += "#define highp\n"; src += "#define texture2DLodEXT texture2DLod\n"; src += "#define texture2DProjLodEXT texture2DProjLod\n"; + src += "#define gl_FragDepthEXT gl_FragDepth\n"; src += "float shadow2DEXT (sampler2DShadow s, vec3 p) { return shadow2D(s,p).r; }\n"; src += "float shadow2DProjEXT (sampler2DShadow s, vec4 p) { return shadow2DProj(s,p).r; }\n"; } @@ -165,6 +166,8 @@ static bool CheckGLSL (bool vertex, bool gles, const std::string& testName, cons replace_string (src, "GL_EXT_shader_texture_lod", "GL_ARB_shader_texture_lod", 0); replace_string (src, "#extension GL_OES_standard_derivatives : require", "", 0); replace_string (src, "#extension GL_EXT_shadow_samplers : require", "", 0); + replace_string (src, "#extension GL_EXT_frag_depth : require", "", 0); + replace_string (src, "precision ", "// precision ", 0); } const char* sourcePtr = src.c_str(); diff --git a/3rdparty/glsl-optimizer/tests/glsl_optimizer_tests.vcproj b/3rdparty/glsl-optimizer/tests/glsl_optimizer_tests.vcproj index b3521331a..2d3ddf879 100644 --- a/3rdparty/glsl-optimizer/tests/glsl_optimizer_tests.vcproj +++ b/3rdparty/glsl-optimizer/tests/glsl_optimizer_tests.vcproj @@ -12,6 +12,9 @@ + @@ -91,6 +94,82 @@ Name="VCPostBuildEventTool" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/runtime/shaders/dx11/fs_bump.bin b/examples/runtime/shaders/dx11/fs_bump.bin index c430a07fcfe93120df4aee9ba3ce44e50acd5024..cb1b29d3c792dbc708155572a62ebb2fe4c918d3 100644 GIT binary patch delta 650 zcmZvYze@sP7{{OIJQdQ=eo_!*otj$?4M9OiSu}<=G!!Xyr644fz7Ntukkv4)PD9BDo2?J3Xv0i1bN{gDyd+|S@3vl zdL|1deSQ?_>qCQAhdo-Sh%Ppym`QHDlJE{q{a@@2lvN{pIp(09;4PDA@je z^dxp2DdU?9@CtUF$VB@Ujv>^s>qr^j2hPC*_(|QOzx)8`GC7EUt|V$|^G3nQialk$H$F(tFKSd`_!M18Rs1|}8;3qh9%C+8LYx+Y!R zOw%nZ12lT(>V9QpU;xT6Ft7q?6CjphW?*1p0g3_f9svf1AQxA+2TTkMAaw#j0;Em` zh#6S^|7V!Uz_5mC;=*6`oIn8$psWK>B^*H64p0FOC|?3dgT&Cqm4V_7Sj4q~;s>yZ zn*+r`&T?R2s0Xqb7+@B-10@_F5-8#kK=B4F;weD!15j}wlc54c06_Vf1EHf5m5 z3AXu+ijyU3B{;ZO0~KxIwr5nD?7$byC^y-IryfY2 z;8A8&+Wdw`n2}Lw5}*C#^Q;1s{rOxN<-zjuV0q=qZ+QAAzvp0`e1^ZCQF#)d`sQMR Gxr_jrZd4cm diff --git a/examples/runtime/shaders/dx11/fs_mesh.bin b/examples/runtime/shaders/dx11/fs_mesh.bin index c36a5e0934cf0a757e62c20f328eff90e3deb32f..40108bf960a3e633f5aa9e7cc659a367d23e6752 100644 GIT binary patch delta 506 zcmaDXcw1o#NTa$iM)U zVPIed(k4LM!UW_qGccq8@fHpSh9DPLHxHl~NSy}|gJ>BbW?=dMpJ5^cgE-T~2BUgz zpg;l;e*j5CK?am90OglJ`7J;iB!(_N0Vu8j6n6k(5SRf~zXC`n0Qn9;3<5Cm%|P)5 zK)wS5Lp_i}NbCkmJOJ_?fEWZ|8jb_S6@b_QEQ%1n4irnkBK`s>wg8Lx7ogY!AZCG@ z!@%SUVF@rX07Dug0c0{TfC&bM()hB>)bgOz(76Sv!f^?7|L;^*; z0w~siMZ5(lb^wT3fU1GMX6OO3f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vs_callback.bin b/examples/runtime/shaders/dx11/vs_callback.bin index 2cf91135ed68e2df7ad7dd1cd8bf0910ed61ab87..ef13160820fce8eefae75641f50b3250ecdfc6c8 100644 GIT binary patch delta 530 zcmeyz*~L9UGU)>&due=beoAT%C&K~;76yJOFDx^)JfJ8)i<3ctk%hs7)g{8o`HamG z@6Wt0iRz)9%NM6geqdx^0Lm~h01<-;5N9wkFzf(g9cBiGGb{`YK`yRtI!qI*rC5Ie zmD)_+$Ra**qeMLyP-y}XgY^Sx5C{O71q1>RiXjHd&jHdPF?8_?ptu51+yRI|paH6W z0+3Ds@*RK}1YqK`f#M5*dC%1N*EX*av`Y|sX3Ed z7*nN7;}dfVG7^JQ(->AWfYky`gn-R27)2Qw#U}q_N@oM2%GU)&#due=beoAT%Cqn}R3j;rt7nYe?9#E8@#mT_H$ilFP#U;YY+4-fB zRE69< zi`#?DgP3K*fULnEBnXiJsfTMw0E#tWickK+n7X-?NraJ6WO5gCx}+dbixC3@*Cz%6 zuy(gT1u!iznTti8QE0Lei$0_9A$>&|ADiq<}` zev~-l3nK#qP=xVq^uP0W>I{Q*>JGx;I2_{7B$ z^;|%u2|)Y-q#p_bplkssKL*Or0n#8bbnyzHxB^hz0f<4M0jhoikWK*d9e@}FVB)iZ z;tPO$2L^_EAcc@v43u~P(+y2}yiEP%Hr|4itu~zW@|lfJOWc zQ0xH^1A_w$UNGuH7^U%Lz#tAvO)g_OuohVl~HW+1*T|8VW5Z+0|VD5XlS|hDS*`oO?F{cXB3&7!>rFJ JI(ZKB3;;9jOCkUO delta 334 zcmX@WxrJkbWXJ(V{?ho|{FKz3u*}r*fTH{?P6h@>76t|umk1~4TC-2zZWiqRKPjJ6 za^)7^HH-{E0F-0}QYJur2PmM!#K6!1#4XGW3_&igZVMPE=1Q^V0A*|@7qW;?Tr5$~ z4pf=|#0S9ofeawvfU+IHJO%~yZ+k?!5m}SENbROIS ze~=(V0w{_QPXLNFV2V$E#+W)eo#_js$mAI2Xhy-w517Rn1two$R%aBN{DWDaQFyWj G%M1Xx+b@6s diff --git a/examples/runtime/shaders/dx11/vs_instancing.bin b/examples/runtime/shaders/dx11/vs_instancing.bin index 48a34a42673f4ea4a336b6f9116bf9fce7bd207d..884c6c533356232fb383c20fac4c07d3127c26de 100644 GIT binary patch delta 492 zcmey()y^|PGVcQ;S804%W@>prQGOODLjnT}!wpuK2q)(Tv8nmGrrDf7EgFLBueWh9 zGB5yT7#M(v!32mim>3u=m>C#)fH(#y806yWrUMiMsq+A05G@153@rctGfZS)_yH8K znQX`^K5?EzJr__s0f;|%jZdZ4%h5IcZH5#sxSVhLEpF95|B zU=hCq6ng-~EKqY^FzP~Bkbn_Y`)4^%E-vI*_&CMk&%6JH;eS-Iu;d1j>(Hz)EPM^pJv$r0Qs9o AYybcN delta 353 zcmZqY`OP&!GVcH*S804%W@>prQGOODg98H#gAc1qgp>2E#XnT_zWrT0;RjbjnXP&U zBLf3ahJgWy7)*fp4p3kX6Oh5oz;J2$4V$PXLNFV2V$E$e6l0iK&EU&v`_J!3@4+h*q55CFRzwH>{O|dl|9KbQ{dB##cUsa#u1SWXu>~tKwPK~5 zR3JOKevz?wY}H97+euG`5-U;5PLIsgSv530Fj)LJ7@s_jj=slVZ%!V1?wAM@A_u$| z%4$ScP{u}dXb=U5hDQSEWi9|Q?e5h&JRp7I#PIB%H>YcW!%$IXR4uEsTlERmXW^3l z_Tqib->=y@!X8`~J delta 525 zcmew^@SlHzWc>w3?$Y?&{FKz3u*}qQPKE;vEDZceA^}DDS)2?Ej4TXnrST=1xv4A+ z2N)R{*08%oI63Fut+F^@!%}P-qq}}>#}{8l1_q!E0|P6NHUVNDCI*HWAm(6ZU@!oR z2f4VqT>vTqsq+A0Muv$q_*mxvxi*s(Im9O(lBnkZ3MT+DNEr+$K-msZ0SzeM0!V|z z(8ZmB;tg2Dy@BEfpyEJRF~H0T2bl*kD}(`AA{`_MkpQYdXs7^+HDD2M0g4>}ViurU zkU2d-HV{mfWl9$Xg&o6c1_oxJO%P#_%n~Le=GCiLZ@$JP!N@2(`8{(!Cs%_4NE3t1 z=5&_(jEsVl^V!511t!O{sWS>qZfDbH6rQ}DEn1QnsKkhYfol_k09d(OhXR=9nXJvO f&d4`8m|Y*PrU<5{38rQ?Sj}N}eMbJtpV?agAtg=W diff --git a/examples/runtime/shaders/dx11/vs_metaballs.bin b/examples/runtime/shaders/dx11/vs_metaballs.bin index 286e97cc2383911e495d5f19b545d6a45791a291..104a339fc634951c366a0d0e018f32397b25581d 100644 GIT binary patch delta 524 zcmeC;n#MgrGU)>&due=beoAT%C&K~;76yJOFDx^)JfJ8)i<3ctk%b|I)g{8o`GNDJ zESKI%SqJ zGx;Ek_{5D8^;|%u2|)Y-q#p_bplkssKL*Or0n#8bbnyzHxB^hz0f<4M0jhoikWK*d z9e@}FVB)iZ;tPO$2L^_E2A~t+5{rQn4d^gsmUb_s~H)X85rS87#JXOA*mIqIg?u$Q>9De z6LShO5`$9H7*;cY)dEd~fXy!$O&J-*Cd)AwGYU`M#VkE}Ewc)v$mC1R`i!EJnOKY^ fxq%9e7#O&Upn>StqyW~+HQA3vosnm98Osy^m!MDo delta 389 zcmbQn-NiLQGU)&#due=beoAT%Cqn}R3j;rt7nYe?9#E8@#mT_H$ii@f#U;YY+2Gd0 zomtEkyW-jJvU6WdR$ydc0Lm~humWilAie_>@L^(LH~_>xK=B|KSGNU>6RV|IbAU27 zlO0*bC+D(qOx!6@&kj_c0K^ACWH)ER{)$Fb-$3Qz81F_r`d9fJ`A16L7)0N7Z!CIv9fG5HoyCD&vo)+qoUwl&iL diff --git a/examples/runtime/shaders/dx11/vs_raymarching.bin b/examples/runtime/shaders/dx11/vs_raymarching.bin index 2c6721fd9ca0e3a17c004fa6f7f6d41f11bdf030..836715adf52b65b199a736c77dec888d76a5b132 100644 GIT binary patch delta 474 zcmZ3$xrS?kWXK0b{?ho|{FKz3u*}r*fTH{?P6h==7KR@zE)h=70&Y&aAslJj?&k8% zWnB4`fsug$D8sK5?-` zJr_`E0uX-y>4$;;M#FLK5E(6ia}L1BK!0F95|BU=hCq z6ng-~z~BIb7mT_PMrnK*Fo=UvlS>#@GcqtUFv68EFhJx&QY%t(CYLd$N|(kb<`iTk z2BoGktY!eK1)2x}n{P3iGBS!y7GN%B6rQ|>S$gt(W)((}$w!#=8AT_5VO|3O9L`6? delta 335 zcmZ3(wSaSiWXJ(V{?ho|{FKz3u*}r*fTH{?P6h@>7KR)amk1|kV?Xz2G6w6mg|RGP z`m2$Dk&%G`D8sH3ukTGx;Hl_{7B$ z_3S{U2|#=Rq#p`6plk;yUjWKi0MZ~aba8E;bw;7d0WA8A!jl_V G)&Kzdmn|Lu diff --git a/examples/runtime/shaders/dx11/vs_update.bin b/examples/runtime/shaders/dx11/vs_update.bin index f631afad128c8d2de1323815bdd2d735b0861ba9..12ee953306da0a4b1ce818e7bd20a6884f5f5ec1 100644 GIT binary patch delta 473 zcmdnPae{M#WXK0b{?ho|{FKz3u*}r*fTH{?P6h==7KSM-E)h=7?e>e8n_sy4Mc}Pa zQ;A2>Ek*_gpbP^8E08t;;tVDRhCM(m!py)R0Td5%adp#SnwTra`U9xcX7Wd7@rjEi z>bZbQ6M*;wNIw(=K-mINehieK1EfJ>=;9SXaRs2b0}z8i162J4Ae{i@I{+~Vz{F<* z#TNki4h#(SKnfwT7%1@o$aer@5P)e|4-{7bVh5lY6O#CTpjZM_94HJ|e*q}A0E_q? zpx6T-1_lQhykOLYFiPXgfI%FTnq0!LnvsE-ff25RfdL{Hl3J0PGr5d0Rk}1jF{dCS yF(@^SVKoC-Ezm>=n0$-zFQeGx8%)uR!jof|r6>C{t1ya8E@9SZ6rH?;c?JMw-$~N| delta 337 zcmX@XxrbwdWXJ(V{?ho|{FKz3u*}r*fTH{?P6h@>76uL$mk1|kue|wJ-53P#>iQpv z|H@Kp&d9(3lwn|C1=1!!d$p(Jv&f&0uUbnnE?eHP__e zfLY)V5`;(qMG@i&K(Pi)@yX8^Qzxf0{b3ZDoWdN#ibWy@ zO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