mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-11-17 05:16:13 +00:00
Updated spirv-tools.
This commit is contained in:
+7
-1
@@ -1005,7 +1005,8 @@ bool IsAllowedSampledImageOperand(spv::Op opcode, ValidationState_t& _) {
|
||||
|
||||
spv_result_t ValidateSampledImage(ValidationState_t& _,
|
||||
const Instruction* inst) {
|
||||
if (_.GetIdOpcode(inst->type_id()) != spv::Op::OpTypeSampledImage) {
|
||||
auto type_inst = _.FindDef(inst->type_id());
|
||||
if (type_inst->opcode() != spv::Op::OpTypeSampledImage) {
|
||||
return _.diag(SPV_ERROR_INVALID_DATA, inst)
|
||||
<< "Expected Result Type to be OpTypeSampledImage.";
|
||||
}
|
||||
@@ -1016,6 +1017,11 @@ spv_result_t ValidateSampledImage(ValidationState_t& _,
|
||||
<< "Expected Image to be of type OpTypeImage.";
|
||||
}
|
||||
|
||||
if (type_inst->GetOperandAs<uint32_t>(1) != image_type) {
|
||||
return _.diag(SPV_ERROR_INVALID_DATA, inst)
|
||||
<< "Expected Image to have the same type as Result Type Image";
|
||||
}
|
||||
|
||||
ImageTypeInfo info;
|
||||
if (!GetImageTypeInfo(_, image_type, &info)) {
|
||||
return _.diag(SPV_ERROR_INVALID_DATA, inst)
|
||||
|
||||
Reference in New Issue
Block a user