mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-18 04:53:06 +01:00
Updated spirv-tools.
This commit is contained in:
@@ -156,7 +156,9 @@ spv_result_t ValidateFunctionParameter(ValidationState_t& _,
|
||||
param_nonarray_type_id =
|
||||
_.FindDef(param_nonarray_type_id)->GetOperandAs<uint32_t>(1u);
|
||||
}
|
||||
if (_.GetIdOpcode(param_nonarray_type_id) == spv::Op::OpTypePointer) {
|
||||
if (_.GetIdOpcode(param_nonarray_type_id) == spv::Op::OpTypePointer ||
|
||||
_.GetIdOpcode(param_nonarray_type_id) ==
|
||||
spv::Op::OpTypeUntypedPointerKHR) {
|
||||
auto param_nonarray_type = _.FindDef(param_nonarray_type_id);
|
||||
if (param_nonarray_type->GetOperandAs<spv::StorageClass>(1u) ==
|
||||
spv::StorageClass::PhysicalStorageBuffer) {
|
||||
@@ -185,7 +187,7 @@ spv_result_t ValidateFunctionParameter(ValidationState_t& _,
|
||||
<< ": can't specify both Aliased and Restrict for "
|
||||
"PhysicalStorageBuffer pointer.";
|
||||
}
|
||||
} else {
|
||||
} else if (param_nonarray_type->opcode() == spv::Op::OpTypePointer) {
|
||||
const auto pointee_type_id =
|
||||
param_nonarray_type->GetOperandAs<uint32_t>(2);
|
||||
const auto pointee_type = _.FindDef(pointee_type_id);
|
||||
@@ -288,7 +290,8 @@ spv_result_t ValidateFunctionCall(ValidationState_t& _,
|
||||
}
|
||||
|
||||
if (_.addressing_model() == spv::AddressingModel::Logical) {
|
||||
if (parameter_type->opcode() == spv::Op::OpTypePointer &&
|
||||
if ((parameter_type->opcode() == spv::Op::OpTypePointer ||
|
||||
parameter_type->opcode() == spv::Op::OpTypeUntypedPointerKHR) &&
|
||||
!_.options()->relax_logical_pointer) {
|
||||
spv::StorageClass sc =
|
||||
parameter_type->GetOperandAs<spv::StorageClass>(1u);
|
||||
@@ -317,9 +320,11 @@ spv_result_t ValidateFunctionCall(ValidationState_t& _,
|
||||
|
||||
// Validate memory object declaration requirements.
|
||||
if (argument->opcode() != spv::Op::OpVariable &&
|
||||
argument->opcode() != spv::Op::OpUntypedVariableKHR &&
|
||||
argument->opcode() != spv::Op::OpFunctionParameter) {
|
||||
const bool ssbo_vptr = _.features().variable_pointers &&
|
||||
sc == spv::StorageClass::StorageBuffer;
|
||||
const bool ssbo_vptr =
|
||||
_.HasCapability(spv::Capability::VariablePointersStorageBuffer) &&
|
||||
sc == spv::StorageClass::StorageBuffer;
|
||||
const bool wg_vptr =
|
||||
_.HasCapability(spv::Capability::VariablePointers) &&
|
||||
sc == spv::StorageClass::Workgroup;
|
||||
|
||||
Reference in New Issue
Block a user