From: Mikko Rasa Date: Tue, 20 Apr 2021 15:28:23 +0000 (+0300) Subject: Put specialization constant instructions in the right section in SPIR-V X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=4cdfb998448e58a3b4c1cda7b85e3f49c9d86596 Put specialization constant instructions in the right section in SPIR-V --- diff --git a/source/glsl/spirv.cpp b/source/glsl/spirv.cpp index 44c1eb87..1cce97df 100644 --- a/source/glsl/spirv.cpp +++ b/source/glsl/spirv.cpp @@ -394,9 +394,9 @@ SpirVGenerator::Id SpirVGenerator::begin_expression(Opcode opcode, Id type_id, u writer.begin_op(content.function_body, opcode, (n_args ? 1+has_result*2+n_args : 0)); } else if(opcode==OP_COMPOSITE_CONSTRUCT) - writer.begin_op(content.function_body, OP_SPEC_CONSTANT_COMPOSITE, (n_args ? 1+has_result*2+n_args : 0)); + writer.begin_op(content.globals, OP_SPEC_CONSTANT_COMPOSITE, (n_args ? 1+has_result*2+n_args : 0)); else - writer.begin_op(content.function_body, OP_SPEC_CONSTANT_OP, (n_args ? 2+has_result*2+n_args : 0)); + writer.begin_op(content.globals, OP_SPEC_CONSTANT_OP, (n_args ? 2+has_result*2+n_args : 0)); Id result_id = next_id++; if(has_result)