GLSL: Address review comments
Fix a warning and some format issues
This commit is contained in:
parent
168e9f2cc9
commit
813cfdce4f
@ -3993,7 +3993,7 @@ void CompilerGLSL::emit_output_variable_initializer(const SPIRVariable &var)
|
||||
}
|
||||
}
|
||||
|
||||
void CompilerGLSL::emit_subgroup_arithmetic_workaround(std::string func, Op op, GroupOperation group_op)
|
||||
void CompilerGLSL::emit_subgroup_arithmetic_workaround(const std::string &func, Op op, GroupOperation group_op)
|
||||
{
|
||||
std::string result;
|
||||
switch (group_op)
|
||||
@ -4092,7 +4092,8 @@ void CompilerGLSL::emit_subgroup_arithmetic_workaround(std::string func, Op op,
|
||||
op_symbol = "*=";
|
||||
}
|
||||
|
||||
for (const TypeInfo& t : type_infos) {
|
||||
for (const TypeInfo &t : type_infos)
|
||||
{
|
||||
statement(t.type, " ", func, "(", t.type, " v)");
|
||||
begin_scope();
|
||||
statement(t.type, " ", result, " = ", t.identity, ";");
|
||||
@ -7339,6 +7340,10 @@ bool CompilerGLSL::is_supported_subgroup_op_in_opengl(spv::Op op, const uint32_t
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
|
@ -639,7 +639,7 @@ protected:
|
||||
void emit_struct(SPIRType &type);
|
||||
void emit_resources();
|
||||
void emit_extension_workarounds(spv::ExecutionModel model);
|
||||
void emit_subgroup_arithmetic_workaround(std::string func, spv::Op op, spv::GroupOperation group_op);
|
||||
void emit_subgroup_arithmetic_workaround(const std::string &func, spv::Op op, spv::GroupOperation group_op);
|
||||
void emit_polyfills(uint32_t polyfills, bool relaxed);
|
||||
void emit_buffer_block_native(const SPIRVariable &var);
|
||||
void emit_buffer_reference_block(uint32_t type_id, bool forward_declaration);
|
||||
|
Loading…
Reference in New Issue
Block a user