diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2015-12-07 15:55:11 -0700 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2015-12-07 16:03:27 -0700 |
| commit | 8e8b0422ce9253042835adaa7de429cb4a3d73f5 (patch) | |
| tree | 7f32cbf32b68ac40a9b5dafa1715ffcc2c8c0d2d | |
| parent | 50efb9756935a84d223ba8c0cf32c08ef38f9b27 (diff) | |
| download | usermoji-8e8b0422ce9253042835adaa7de429cb4a3d73f5.tar.xz | |
layers: LX223, Properly handle NULL pipelineCache in pipeline create routines
ObjectTracker was choking on null compute pipeline caches. Disabled validation check
on null pipelineCaches for ONLY Create[Compute|Graphics]Pipelines APIs.
| -rwxr-xr-x | vk-layer-generate.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vk-layer-generate.py b/vk-layer-generate.py index 56d26c10..cc1fb425 100755 --- a/vk-layer-generate.py +++ b/vk-layer-generate.py @@ -1272,10 +1272,6 @@ class ObjectTrackerSubcommand(Subcommand): procs_txt.append(' return log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, reinterpret_cast<uint64_t>(object), 0, OBJTRACK_INVALID_OBJECT, "OBJTRACK",') procs_txt.append(' "Invalid %s Object 0x%%" PRIx64 ,reinterpret_cast<uint64_t>(object));' % o) else: - if o == "VkPipelineCache": - procs_txt.append(' // VkPipelineCache object can be NULL if not caching') - procs_txt.append(' if (object == VK_NULL_HANDLE) return VK_TRUE;') - procs_txt.append('') if o == "VkImage": procs_txt.append(' // We need to validate normal image objects and those from the swapchain') procs_txt.append(' if ((%sMap.find((uint64_t)object) == %sMap.end()) &&' % (o, o)) @@ -1660,6 +1656,11 @@ class ObjectTrackerSubcommand(Subcommand): using_line += ' if (fence != VK_NULL_HANDLE) {\n' using_line += ' skipCall |= validate_%s(%s, %s);\n' % (name, param0_name, opn) using_line += ' }\n' + elif ('CreateGraphicsPipelines' in proto.name or 'CreateComputePipelines' in proto.name) and 'pipelineCache' == opn: + using_line += ' // PipelineCache is optional, validate if present\n' + using_line += ' if (pipelineCache != VK_NULL_HANDLE) {\n' + using_line += ' skipCall |= validate_%s(%s, %s);\n' % (name, param0_name, opn) + using_line += ' }\n' else: using_line += ' skipCall |= validate_%s(%s, %s);\n' % (name, param0_name, opn) else: |
