Skip to content

Commit

Permalink
Bump 1.9.2 [release 1.9.2]
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Aug 21, 2023
1 parent 3d40a38 commit 75f8ea8
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 43 deletions.
80 changes: 39 additions & 41 deletions 3rdparty/spirv-cross/spirv_glsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,6 @@ void CompilerGLSL::emit_header()
switch (execution.model)
{
case ExecutionModelVertex:
emit_es_precision_qualifiers();
if (options.ovr_multiview_view_count)
inputs.push_back(join("num_views = ", options.ovr_multiview_view_count));
break;
Expand Down Expand Up @@ -1123,7 +1122,45 @@ void CompilerGLSL::emit_header()
}

case ExecutionModelFragment:
emit_es_precision_qualifiers();
if (options.es)
{
switch (options.fragment.default_float_precision)
{
case Options::Lowp:
statement("precision lowp float;");
break;

case Options::Mediump:
statement("precision mediump float;");
break;

case Options::Highp:
statement("precision highp float;");
break;

default:
break;
}

switch (options.fragment.default_int_precision)
{
case Options::Lowp:
statement("precision lowp int;");
break;

case Options::Mediump:
statement("precision mediump int;");
break;

case Options::Highp:
statement("precision highp int;");
break;

default:
break;
}
}

if (execution.flags.get(ExecutionModeEarlyFragmentTests))
inputs.push_back("early_fragment_tests");
if (execution.flags.get(ExecutionModePostDepthCoverage))
Expand Down Expand Up @@ -7470,45 +7507,6 @@ static inline bool image_opcode_is_sample_no_dref(Op op)
}
}

void CompilerGLSL::emit_es_precision_qualifiers()
{
if (options.es) {
switch (options.fragment.default_float_precision) {
case Options::Lowp:
statement("precision lowp float;");
break;

case Options::Mediump:
statement("precision mediump float;");
break;

case Options::Highp:
statement("precision highp float;");
break;

default:
break;
}

switch (options.fragment.default_int_precision) {
case Options::Lowp:
statement("precision lowp int;");
break;

case Options::Mediump:
statement("precision mediump int;");
break;

case Options::Highp:
statement("precision highp int;");
break;

default:
break;
}
}
}

void CompilerGLSL::emit_sparse_feedback_temporaries(uint32_t result_type_id, uint32_t id, uint32_t &feedback_id,
uint32_t &texel_id)
{
Expand Down
1 change: 0 additions & 1 deletion 3rdparty/spirv-cross/spirv_glsl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ class CompilerGLSL : public Compiler
};
virtual std::string to_function_args(const TextureFunctionArguments &args, bool *p_forward);

void emit_es_precision_qualifiers(); // by halx99
void emit_sparse_feedback_temporaries(uint32_t result_type_id, uint32_t id, uint32_t &feedback_id,
uint32_t &texel_id);
uint32_t get_sparse_feedback_texel_id(uint32_t id) const;
Expand Down
3 changes: 2 additions & 1 deletion src/glslcc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
// 1.9.1 Vertex shader: emit precision qualifiers for essl profile
// Update glslang to: 12.3.1
// Update spirv-corss to: 633dc30 (Aug 17, 2023)
// 1.9.2 Revert `Vertex shader: emit precision qualifiers for essl profile`
//
#define _ALLOW_KEYWORD_MACROS

Expand Down Expand Up @@ -93,7 +94,7 @@

#define VERSION_MAJOR 1
#define VERSION_MINOR 9
#define VERSION_SUB 1
#define VERSION_SUB 2

static const sx_alloc* g_alloc = sx_alloc_malloc();
static sgs_file* g_sgs = nullptr;
Expand Down

0 comments on commit 75f8ea8

Please sign in to comment.