Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sampled image validation #5789

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

alan-baker
Copy link
Contributor

Fixes #5781

  • Requires all image operands to match except for depth between operand and result

@alan-baker alan-baker requested a review from s-perron September 6, 2024 15:51
@alan-baker
Copy link
Contributor Author

@gnl21 does this match your memory of the outcome of the telecon?

Copy link
Contributor

@gnl21 gnl21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this matches what I think was agreed.

source/val/validate_image.cpp Outdated Show resolved Hide resolved
Fixes KhronosGroup#5781

* Requires all image operands to match except for depth between operand
  and result
@alan-baker alan-baker enabled auto-merge (squash) September 9, 2024 17:05
@alan-baker alan-baker merged commit e9915ce into KhronosGroup:main Sep 9, 2024
23 of 24 checks passed
@alan-baker alan-baker deleted the sampled-image-5781 branch September 9, 2024 17:15
@@ -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());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if type_inst is nullptr?

Keenuts pushed a commit to Keenuts/SPIRV-Tools that referenced this pull request Nov 12, 2024
Fixes KhronosGroup#5781

* Requires all image operands to match except for depth between operand
  and result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive validation for combined image sampler with comparison
4 participants