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

Implement SPV_NV_bindless_texture related changes #4847

Merged
merged 1 commit into from
Jul 19, 2022

Conversation

pmistryNV
Copy link
Contributor

@alan-baker kindly let me know where should I add test cases for this extension?
Note: Previous PR #4597 was closed. I have addressed all the comments except adding test cases.

source/val/validate_decorations.cpp Show resolved Hide resolved
source/val/validate_image.cpp Outdated Show resolved Hide resolved
source/val/validate_instruction.cpp Show resolved Hide resolved
@@ -363,6 +363,7 @@ spv_result_t ModuleLayoutPass(ValidationState_t& _, const Instruction* inst) {
case kLayoutExtensions:
case kLayoutExtInstImport:
case kLayoutMemoryModel:
case kLayoutSamplerImageAddressMode:
Copy link
Contributor

Choose a reason for hiding this comment

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

Tests belong in test/val/val_layout_test.cpp

source/val/validate_logicals.cpp Show resolved Hide resolved
source/val/validate_type.cpp Outdated Show resolved Hide resolved
@pmistryNV pmistryNV force-pushed the bindless_texture branch 2 times, most recently from 8d2b8f3 to b94e026 Compare July 13, 2022 20:49
@pmistryNV
Copy link
Contributor Author

@alan-baker I have addressed all of your review comments. Kindly have a look.

@pmistryNV
Copy link
Contributor Author

pmistryNV commented Jul 15, 2022

Copy link
Contributor

@alan-baker alan-baker left a comment

Choose a reason for hiding this comment

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

Almost there, is there a limit on the number of instances of the addressing mode that can be specified? Right now the validator seems to assume the last one will be used.

@@ -483,6 +483,22 @@ spv_result_t InstructionPass(ValidationState_t& _, const Instruction* inst) {
if (auto error = LimitCheckNumVars(_, inst->id(), storage_class)) {
return error;
}
} else if (opcode == SpvOpSamplerImageAddressingModeNV) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this also check whether another SpvOpSamplerImageAddressingModeNV instruction has been seen? The extension isn't explicit, but I assume only a single instance of this instruction can be specified.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes only one is allowed. I can add a check

"SPV_NV_bindless_texture";
}
uint32_t bitwidth = inst->GetOperandAs<uint32_t>(0);
if (_.samplerimage_variable_address_mode() != 0) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alan-baker this is where it checks to ensure OpSamplerImageAddressingModeNV is called only once. Is this enough?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think so, can you just cover it with a test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added a test "NVBindlessAddressModeFromLayoutSpecifiedTwice" in val_layout_test.cpp

@alan-baker alan-baker merged commit 60615b8 into KhronosGroup:master Jul 19, 2022
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.

3 participants