Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross
This commit is contained in:
commit
42e718b77d
@ -2411,9 +2411,9 @@ uint32_t Compiler::get_work_group_size_specialization_constants(SpecializationCo
|
||||
SpecializationConstant &z) const
|
||||
{
|
||||
auto &execution = get_entry_point();
|
||||
x = {};
|
||||
y = {};
|
||||
z = {};
|
||||
x = { 0, 0 };
|
||||
y = { 0, 0 };
|
||||
z = { 0, 0 };
|
||||
|
||||
if (execution.workgroup_size.constant != 0)
|
||||
{
|
||||
|
@ -2609,21 +2609,21 @@ void CompilerHLSL::emit_atomic(const uint32_t *ops, uint32_t length, spv::Op op)
|
||||
|
||||
auto &data_type = expression_type(ops[2]);
|
||||
auto *chain = maybe_get<SPIRAccessChain>(ops[2]);
|
||||
SPIRType::BaseType expression_type;
|
||||
SPIRType::BaseType expr_type;
|
||||
if (data_type.storage == StorageClassImage || !chain)
|
||||
{
|
||||
statement(atomic_op, "(", to_expression(ops[2]), ", ", value_expr, ", ", to_name(id), ");");
|
||||
expression_type = data_type.basetype;
|
||||
expr_type = data_type.basetype;
|
||||
}
|
||||
else
|
||||
{
|
||||
// RWByteAddress buffer is always uint in its underlying type.
|
||||
expression_type = SPIRType::UInt;
|
||||
expr_type = SPIRType::UInt;
|
||||
statement(chain->base, ".", atomic_op, "(", chain->dynamic_index, chain->static_index, ", ", value_expr, ", ",
|
||||
to_name(id), ");");
|
||||
}
|
||||
|
||||
auto expr = bitcast_expression(type, expression_type, to_name(id));
|
||||
auto expr = bitcast_expression(type, expr_type, to_name(id));
|
||||
set<SPIRExpression>(id, expr, result_type, true);
|
||||
flush_all_atomic_capable_variables();
|
||||
register_read(ops[1], ops[2], should_forward(ops[2]));
|
||||
|
@ -1407,7 +1407,7 @@ void CompilerMSL::emit_instruction(const Instruction &instruction)
|
||||
string img_exp = to_expression(img_id);
|
||||
auto &img_type = expression_type(img_id);
|
||||
Dim img_dim = img_type.image.dim;
|
||||
bool is_array = img_type.image.arrayed;
|
||||
bool img_is_array = img_type.image.arrayed;
|
||||
|
||||
if (img_type.basetype != SPIRType::Image)
|
||||
SPIRV_CROSS_THROW("Invalid type for OpImageQuerySize.");
|
||||
@ -1430,7 +1430,7 @@ void CompilerMSL::emit_instruction(const Instruction &instruction)
|
||||
if (img_dim == Dim3D)
|
||||
expr += ", " + img_exp + ".get_depth(" + lod + ")";
|
||||
|
||||
if (is_array)
|
||||
if (img_is_array)
|
||||
expr += ", " + img_exp + ".get_array_size()";
|
||||
|
||||
expr += ")";
|
||||
|
Loading…
Reference in New Issue
Block a user