Skip to content

Commit

Permalink
GLSL: Fix atomic_uint being incorrectly generated as uint
Browse files Browse the repository at this point in the history
  • Loading branch information
hypengw committed Feb 23, 2024
1 parent b8fcf30 commit 18cb2ce
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 18cb2ce

Please sign in to comment.