X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fspirv.cpp;h=1cce97dfbf34888580ab6137140127e6fc67b094;hb=4cdfb998448e58a3b4c1cda7b85e3f49c9d86596;hp=44c1eb87a4c382a4c4735df44361c4188a5a633b;hpb=523491787b2b0321748a53f139c1a4355d2f9e85;p=libs%2Fgl.git 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)