-
Notifications
You must be signed in to change notification settings - Fork 414
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
Add push descriptor validation #460
Add push descriptor validation #460
Conversation
Android build broken |
c1dae02
to
5fdc1c1
Compare
5fdc1c1
to
dbe9f97
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things for you to check out. Not quite through this but wanted to queue up these comments and will finish the rest of the review today.
<< "VkWriteDescriptorSetInlineUniformBlockEXT missing"; | ||
} else { | ||
error_str << "Attempting write update to descriptor set " << set_ << " binding #" << update->dstBinding << " with " | ||
error_str << "Attempting write update to " << StringifySetAndLayout() << " binding #" << update->dstBinding | ||
<< " with " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formatting on these lines looks a little goofy with two really short strings (1 here, 1 on 1904 below). Perhaps possible to combine a line or two from below in order to save lines?
@@ -31,6 +31,7 @@ | |||
* Author: Mike Schuchardt <mikes@lunarg.com> | |||
* Author: Mike Weiblen <mikew@lunarg.com> | |||
* Author: Tony Barbour <tony@LunarG.com> | |||
* Author: John Zulauf <jzulauf@lunarg.com> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YES! Finally getting all that fame you deserve! 👍
layers/core_validation.cpp
Outdated
@@ -772,6 +773,15 @@ shader_module const *GetShaderModuleState(layer_data const *dev_data, VkShaderMo | |||
return it->second.get(); | |||
} | |||
|
|||
const TEMPLATE_STATE *GetDescriptorTemplateState(const layer_data *dev_data, | |||
VkDescriptorUpdateTemplateKHR descriptor_update_template) { | |||
auto it = dev_data->desc_template_map.find(descriptor_update_template); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const auto &?
@@ -1230,14 +1240,6 @@ static bool ValidateCmdBufDrawState(layer_data *dev_data, GLOBAL_CB_NODE *cb_nod | |||
|
|||
for (const auto &set_binding_pair : pPipe->active_slots) { | |||
uint32_t setIndex = set_binding_pair.first; | |||
|
|||
// TODO -- remove this continue path when CmdPushDescriptorSet is implemented, for now it prevents a false positive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a few changes that should be made before landing. A couple of minor functional issues and some typos.
dbe9f97
to
d88f226
Compare
@tobine -- I think I picked up everything from your review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great
layers/core_validation.cpp
Outdated
func_name, set, layout_u64); | ||
const auto dsl = set_layouts[set]; | ||
if (dsl) { | ||
if (0 == (dsl->IsPushDescriptor())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!dsl->IsPushDescriptor())
Tested buffer was not setting the correct usage flag. Enabling push descriptor validation (next commits) causes test case to fail Change-Id: Ibd8fd98259825ae376289b4d9ed867aa1e202818
Update the write descriptor validation to be able to validate and report a push descriptor update. Change-Id: I8b2c0de85ae3eded211fd5ac397c9e30de3a5d34
Add validation of CmdPushDescriptorSet(WithTemplate) descriptor state updates, removing the code disabling later use of the recorded data. Change-Id: If9c4345e67c974f36e7a5356a517f411e470c2c5
Add push descriptor validation to buffer validation path test. Change-Id: I80135f69a0ac4351b6415559403573574917b281
d88f226
to
878dad5
Compare
Add validation of CmdPushDescriptorSet(WithTemplate) descriptor state updates, removing the code disabling later use of the recorded data.
Addresses #413 and #428