Fix GCC 4.x warning.
This commit is contained in:
parent
2cc374a0c8
commit
758427e127
@ -2697,7 +2697,7 @@ string CompilerGLSL::enclose_expression(const string &expr)
|
|||||||
return expr;
|
return expr;
|
||||||
}
|
}
|
||||||
|
|
||||||
string CompilerGLSL::dereference_expression(const SPIRType &expression_type, const std::string &expr)
|
string CompilerGLSL::dereference_expression(const SPIRType &expr_type, const std::string &expr)
|
||||||
{
|
{
|
||||||
// If this expression starts with an address-of operator ('&'), then
|
// If this expression starts with an address-of operator ('&'), then
|
||||||
// just return the part after the operator.
|
// just return the part after the operator.
|
||||||
@ -2706,8 +2706,8 @@ string CompilerGLSL::dereference_expression(const SPIRType &expression_type, con
|
|||||||
return expr.substr(1);
|
return expr.substr(1);
|
||||||
else if (backend.native_pointers)
|
else if (backend.native_pointers)
|
||||||
return join('*', expr);
|
return join('*', expr);
|
||||||
else if (expression_type.storage == StorageClassPhysicalStorageBufferEXT &&
|
else if (expr_type.storage == StorageClassPhysicalStorageBufferEXT && expr_type.basetype != SPIRType::Struct &&
|
||||||
expression_type.basetype != SPIRType::Struct && expression_type.pointer_depth == 1)
|
expr_type.pointer_depth == 1)
|
||||||
{
|
{
|
||||||
return join(enclose_expression(expr), ".value");
|
return join(enclose_expression(expr), ".value");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user