Skip to content

Commit

Permalink
Merge pull request KhronosGroup#2282 from hypengw/main
Browse files Browse the repository at this point in the history
GLSL: Fix atomic_uint being incorrectly generated as uint
  • Loading branch information
HansKristian-Work committed Feb 26, 2024
2 parents 346c734 + 18cb2ce commit 5f7a6de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spirv_cross.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ const SPIRType &Compiler::get_pointee_type(uint32_t type_id) const

uint32_t Compiler::get_variable_data_type_id(const SPIRVariable &var) const
{
if (var.phi_variable)
if (var.phi_variable || var.storage == spv::StorageClass::StorageClassAtomicCounter)
return var.basetype;
return get_pointee_type_id(var.basetype);
}
Expand Down
2 changes: 1 addition & 1 deletion spirv_glsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2568,7 +2568,7 @@ const char *CompilerGLSL::to_storage_qualifiers_glsl(const SPIRVariable &var)
return var.storage == StorageClassInput ? "in " : "out ";
}
else if (var.storage == StorageClassUniformConstant || var.storage == StorageClassUniform ||
var.storage == StorageClassPushConstant)
var.storage == StorageClassPushConstant || var.storage == StorageClassAtomicCounter)
{
return "uniform ";
}
Expand Down

0 comments on commit 5f7a6de

Please sign in to comment.