mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-11-09 22:00:05 +00:00
Merge pull request #845 from cdavis5e/fix-assertions
Move assertions after the check for equal types.
This commit is contained in:
commit
84f56d0b43
@ -5254,12 +5254,12 @@ case OpGroupNonUniform##op: \
|
||||
|
||||
string CompilerGLSL::bitcast_glsl_op(const SPIRType &out_type, const SPIRType &in_type)
|
||||
{
|
||||
assert(out_type.basetype != SPIRType::Boolean);
|
||||
assert(in_type.basetype != SPIRType::Boolean);
|
||||
|
||||
if (out_type.basetype == in_type.basetype)
|
||||
return "";
|
||||
|
||||
assert(out_type.basetype != SPIRType::Boolean);
|
||||
assert(in_type.basetype != SPIRType::Boolean);
|
||||
|
||||
bool integral_cast = type_is_integral(out_type) && type_is_integral(in_type);
|
||||
bool same_size_cast = out_type.width == in_type.width;
|
||||
|
||||
|
@ -5467,12 +5467,12 @@ string CompilerMSL::image_type_glsl(const SPIRType &type, uint32_t id)
|
||||
|
||||
string CompilerMSL::bitcast_glsl_op(const SPIRType &out_type, const SPIRType &in_type)
|
||||
{
|
||||
assert(out_type.basetype != SPIRType::Boolean);
|
||||
assert(in_type.basetype != SPIRType::Boolean);
|
||||
|
||||
if (out_type.basetype == in_type.basetype)
|
||||
return "";
|
||||
|
||||
assert(out_type.basetype != SPIRType::Boolean);
|
||||
assert(in_type.basetype != SPIRType::Boolean);
|
||||
|
||||
bool integral_cast = type_is_integral(out_type) && type_is_integral(in_type);
|
||||
bool same_size_cast = out_type.width == in_type.width;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user