Mark Lobodzinski | a8151b0 | 2020-02-27 13:38:08 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2018-2020 The Khronos Group Inc. |
| 2 | * Copyright (c) 2018-2020 Valve Corporation |
| 3 | * Copyright (c) 2018-2020 LunarG, Inc. |
Karl Schultz | 7b024b4 | 2018-08-30 16:18:18 -0600 | [diff] [blame] | 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | * |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 17 | * Author: Karl Schultz <karl@lunarg.com> |
| 18 | * Author: Tony Barbour <tony@lunarg.com> |
Karl Schultz | 7b024b4 | 2018-08-30 16:18:18 -0600 | [diff] [blame] | 19 | */ |
| 20 | |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 21 | #pragma once |
| 22 | |
| 23 | #include "chassis.h" |
| 24 | #include "state_tracker.h" |
Tony-LunarG | 0e56472 | 2019-03-19 16:09:14 -0600 | [diff] [blame] | 25 | #include "vk_mem_alloc.h" |
Tony-LunarG | b5fae46 | 2020-03-05 12:43:25 -0700 | [diff] [blame] | 26 | #include "gpu_utils.h" |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 27 | class GpuAssisted; |
Tony-LunarG | 0e56472 | 2019-03-19 16:09:14 -0600 | [diff] [blame] | 28 | |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 29 | struct GpuAssistedDeviceMemoryBlock { |
Mark Lobodzinski | 2a3ee4a | 2019-03-13 13:11:39 -0600 | [diff] [blame] | 30 | VkBuffer buffer; |
Tony-LunarG | 0e56472 | 2019-03-19 16:09:14 -0600 | [diff] [blame] | 31 | VmaAllocation allocation; |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 32 | std::unordered_map<uint32_t, const cvdescriptorset::Descriptor*> update_at_submit; |
Mark Lobodzinski | 2a3ee4a | 2019-03-13 13:11:39 -0600 | [diff] [blame] | 33 | }; |
| 34 | |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 35 | struct GpuAssistedBufferInfo { |
| 36 | GpuAssistedDeviceMemoryBlock output_mem_block; |
| 37 | GpuAssistedDeviceMemoryBlock di_input_mem_block; // Descriptor Indexing input |
| 38 | GpuAssistedDeviceMemoryBlock bda_input_mem_block; // Buffer Device Address input |
Mark Lobodzinski | 2a3ee4a | 2019-03-13 13:11:39 -0600 | [diff] [blame] | 39 | VkDescriptorSet desc_set; |
| 40 | VkDescriptorPool desc_pool; |
Jason Macnak | 67407e7 | 2019-07-11 11:05:09 -0700 | [diff] [blame] | 41 | VkPipelineBindPoint pipeline_bind_point; |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 42 | GpuAssistedBufferInfo(GpuAssistedDeviceMemoryBlock output_mem_block, GpuAssistedDeviceMemoryBlock di_input_mem_block, |
| 43 | GpuAssistedDeviceMemoryBlock bda_input_mem_block, VkDescriptorSet desc_set, VkDescriptorPool desc_pool, |
| 44 | VkPipelineBindPoint pipeline_bind_point) |
Jason Macnak | 67407e7 | 2019-07-11 11:05:09 -0700 | [diff] [blame] | 45 | : output_mem_block(output_mem_block), |
Tony-LunarG | 8eb5a00 | 2019-07-25 16:49:00 -0600 | [diff] [blame] | 46 | di_input_mem_block(di_input_mem_block), |
| 47 | bda_input_mem_block(bda_input_mem_block), |
Jason Macnak | 67407e7 | 2019-07-11 11:05:09 -0700 | [diff] [blame] | 48 | desc_set(desc_set), |
| 49 | desc_pool(desc_pool), |
| 50 | pipeline_bind_point(pipeline_bind_point){}; |
Mark Lobodzinski | 2a3ee4a | 2019-03-13 13:11:39 -0600 | [diff] [blame] | 51 | }; |
| 52 | |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 53 | struct GpuAssistedShaderTracker { |
| 54 | VkPipeline pipeline; |
| 55 | VkShaderModule shader_module; |
| 56 | std::vector<unsigned int> pgm; |
| 57 | }; |
| 58 | |
| 59 | struct GpuAssistedAccelerationStructureBuildValidationBufferInfo { |
Jason Macnak | 83cfd58 | 2019-07-31 10:14:24 -0700 | [diff] [blame] | 60 | // The acceleration structure that is being built. |
| 61 | VkAccelerationStructureNV acceleration_structure = VK_NULL_HANDLE; |
| 62 | |
| 63 | // The descriptor pool and descriptor set being used to validate a given build. |
| 64 | VkDescriptorPool descriptor_pool = VK_NULL_HANDLE; |
| 65 | VkDescriptorSet descriptor_set = VK_NULL_HANDLE; |
| 66 | |
| 67 | // The storage buffer used by the validating compute shader whichcontains info about |
| 68 | // the valid handles and which is written to communicate found invalid handles. |
| 69 | VkBuffer validation_buffer = VK_NULL_HANDLE; |
| 70 | VmaAllocation validation_buffer_allocation = VK_NULL_HANDLE; |
| 71 | }; |
| 72 | |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 73 | struct GpuAssistedAccelerationStructureBuildValidationState { |
Jason Macnak | 83cfd58 | 2019-07-31 10:14:24 -0700 | [diff] [blame] | 74 | bool initialized = false; |
| 75 | |
| 76 | VkPipeline pipeline = VK_NULL_HANDLE; |
| 77 | VkPipelineLayout pipeline_layout = VK_NULL_HANDLE; |
| 78 | |
| 79 | VkAccelerationStructureNV replacement_as = VK_NULL_HANDLE; |
| 80 | VmaAllocation replacement_as_allocation = VK_NULL_HANDLE; |
| 81 | uint64_t replacement_as_handle = 0; |
| 82 | |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 83 | std::unordered_map<VkCommandBuffer, std::vector<GpuAssistedAccelerationStructureBuildValidationBufferInfo>> validation_buffers; |
Jason Macnak | 83cfd58 | 2019-07-31 10:14:24 -0700 | [diff] [blame] | 84 | }; |
| 85 | |
Tony-LunarG | 99b880b | 2019-09-26 11:19:52 -0600 | [diff] [blame] | 86 | class GpuAssisted : public ValidationStateTracker { |
Tony-LunarG | 1dce239 | 2019-10-23 16:49:29 -0600 | [diff] [blame] | 87 | VkPhysicalDeviceFeatures supported_features; |
Tony-LunarG | 8eb5a00 | 2019-07-25 16:49:00 -0600 | [diff] [blame] | 88 | VkBool32 shaderInt64; |
Tony-LunarG | 99b880b | 2019-09-26 11:19:52 -0600 | [diff] [blame] | 89 | uint32_t unique_shader_module_id = 0; |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 90 | std::unordered_map<VkCommandBuffer, std::vector<GpuAssistedBufferInfo>> command_buffer_map; // gpu_buffer_list; |
Tony-LunarG | 0e56472 | 2019-03-19 16:09:14 -0600 | [diff] [blame] | 91 | uint32_t output_buffer_size; |
Tony-LunarG | 8eb5a00 | 2019-07-25 16:49:00 -0600 | [diff] [blame] | 92 | std::map<VkDeviceAddress, VkDeviceSize> buffer_map; |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 93 | GpuAssistedAccelerationStructureBuildValidationState acceleration_structure_validation_state; |
Tony-LunarG | 1dce239 | 2019-10-23 16:49:29 -0600 | [diff] [blame] | 94 | |
| 95 | public: |
Mark Lobodzinski | 0dcb87d | 2020-03-30 16:09:24 -0600 | [diff] [blame] | 96 | GpuAssisted() { container_type = LayerObjectTypeGpuAssisted; } |
| 97 | |
Tony-LunarG | 1dce239 | 2019-10-23 16:49:29 -0600 | [diff] [blame] | 98 | bool aborted = false; |
Tony-LunarG | 5c38b18 | 2020-06-10 16:15:32 -0600 | [diff] [blame^] | 99 | bool descriptor_indexing = false; |
Tony-LunarG | 1dce239 | 2019-10-23 16:49:29 -0600 | [diff] [blame] | 100 | VkDevice device; |
| 101 | VkPhysicalDevice physicalDevice; |
| 102 | uint32_t adjusted_max_desc_sets; |
| 103 | uint32_t desc_set_bind_index; |
Tony-LunarG | 57ada96 | 2020-05-01 16:21:00 -0600 | [diff] [blame] | 104 | VkDescriptorSetLayout debug_desc_layout = VK_NULL_HANDLE; |
| 105 | VkDescriptorSetLayout dummy_desc_layout = VK_NULL_HANDLE; |
Tony-LunarG | b5fae46 | 2020-03-05 12:43:25 -0700 | [diff] [blame] | 106 | std::unique_ptr<UtilDescriptorSetManager> desc_set_manager; |
Tony-LunarG | 1dce239 | 2019-10-23 16:49:29 -0600 | [diff] [blame] | 107 | std::unordered_map<uint32_t, GpuAssistedShaderTracker> shader_map; |
| 108 | PFN_vkSetDeviceLoaderData vkSetDeviceLoaderData; |
| 109 | VmaAllocator vmaAllocator = {}; |
Tony-LunarG | b5fae46 | 2020-03-05 12:43:25 -0700 | [diff] [blame] | 110 | std::map<VkQueue, UtilQueueBarrierCommandInfo> queue_barrier_command_infos; |
Tony-LunarG | 1dce239 | 2019-10-23 16:49:29 -0600 | [diff] [blame] | 111 | std::vector<GpuAssistedBufferInfo>& GetBufferInfo(const VkCommandBuffer command_buffer) { |
Mark Lobodzinski | 2a3ee4a | 2019-03-13 13:11:39 -0600 | [diff] [blame] | 112 | auto buffer_list = command_buffer_map.find(command_buffer); |
| 113 | if (buffer_list == command_buffer_map.end()) { |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 114 | std::vector<GpuAssistedBufferInfo> new_list{}; |
Mark Lobodzinski | 2a3ee4a | 2019-03-13 13:11:39 -0600 | [diff] [blame] | 115 | command_buffer_map[command_buffer] = new_list; |
| 116 | return command_buffer_map[command_buffer]; |
| 117 | } |
| 118 | return buffer_list->second; |
| 119 | } |
Mark Lobodzinski | a8151b0 | 2020-02-27 13:38:08 -0700 | [diff] [blame] | 120 | |
Tony-LunarG | 1dce239 | 2019-10-23 16:49:29 -0600 | [diff] [blame] | 121 | public: |
Mark Lobodzinski | a8151b0 | 2020-02-27 13:38:08 -0700 | [diff] [blame] | 122 | template <typename T> |
| 123 | void ReportSetupProblem(T object, const char* const specific_message) const; |
Tony-LunarG | 5c38b18 | 2020-06-10 16:15:32 -0600 | [diff] [blame^] | 124 | bool CheckForDescriptorIndexing(DeviceFeatures enabled_features) const; |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 125 | void PreCallRecordCreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo, |
| 126 | const VkAllocationCallbacks* pAllocator, VkDevice* pDevice, |
| 127 | safe_VkDeviceCreateInfo* modified_create_info); |
| 128 | void PostCallRecordCreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo, |
| 129 | const VkAllocationCallbacks* pAllocator, VkDevice* pDevice, VkResult result); |
Tony-LunarG | 588c705 | 2020-04-23 10:47:21 -0600 | [diff] [blame] | 130 | void PostCallRecordGetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfoEXT* pInfo, VkDeviceAddress address); |
Tony-LunarG | 7e0842f | 2019-12-10 09:26:34 -0700 | [diff] [blame] | 131 | void PostCallRecordGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfoEXT* pInfo, |
| 132 | VkDeviceAddress address); |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 133 | void PostCallRecordGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfoEXT* pInfo, |
| 134 | VkDeviceAddress address); |
| 135 | void PreCallRecordDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator); |
| 136 | void PreCallRecordDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator); |
| 137 | void PostCallRecordBindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, |
| 138 | const VkBindAccelerationStructureMemoryInfoNV* pBindInfos, |
| 139 | VkResult result); |
| 140 | void PreCallRecordCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, |
| 141 | const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout, |
| 142 | void* cpl_state_data); |
| 143 | void PostCallRecordCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, |
| 144 | const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout, |
| 145 | VkResult result); |
| 146 | void ResetCommandBuffer(VkCommandBuffer commandBuffer); |
| 147 | bool PreCallValidateCmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, |
| 148 | VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, |
| 149 | uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, |
| 150 | uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
Jeff Bolz | 5c801d1 | 2019-10-09 10:38:45 -0500 | [diff] [blame] | 151 | uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) const; |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 152 | void PreCallRecordCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, |
| 153 | VkBuffer* pBuffer, void* cb_state_data); |
| 154 | void CreateAccelerationStructureBuildValidationState(GpuAssisted* device_GpuAssisted); |
| 155 | void DestroyAccelerationStructureBuildValidationState(); |
| 156 | void PreCallRecordCmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, |
| 157 | VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, |
| 158 | VkAccelerationStructureNV dst, VkAccelerationStructureNV src, |
| 159 | VkBuffer scratch, VkDeviceSize scratchOffset); |
| 160 | void ProcessAccelerationStructureBuildValidationBuffer(VkQueue queue, CMD_BUFFER_STATE* cb_node); |
| 161 | void PreCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, |
| 162 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
| 163 | const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, |
| 164 | void* cgpl_state_data); |
| 165 | void PreCallRecordCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, |
| 166 | const VkComputePipelineCreateInfo* pCreateInfos, |
| 167 | const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, |
| 168 | void* ccpl_state_data); |
| 169 | void PreCallRecordCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, |
| 170 | const VkRayTracingPipelineCreateInfoNV* pCreateInfos, |
| 171 | const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, |
| 172 | void* crtpl_state_data); |
Jeff Bolz | 443c2ca | 2020-03-19 12:11:51 -0500 | [diff] [blame] | 173 | void PreCallRecordCreateRayTracingPipelinesKHR(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, |
| 174 | const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, |
| 175 | const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, |
| 176 | void* crtpl_state_data); |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 177 | void PostCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, |
| 178 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
| 179 | const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, VkResult result, |
| 180 | void* cgpl_state_data); |
| 181 | void PostCallRecordCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, |
| 182 | const VkComputePipelineCreateInfo* pCreateInfos, |
| 183 | const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, VkResult result, |
| 184 | void* ccpl_state_data); |
| 185 | void PostCallRecordCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, |
| 186 | const VkRayTracingPipelineCreateInfoNV* pCreateInfos, |
| 187 | const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, VkResult result, |
| 188 | void* crtpl_state_data); |
Jeff Bolz | 443c2ca | 2020-03-19 12:11:51 -0500 | [diff] [blame] | 189 | void PostCallRecordCreateRayTracingPipelinesKHR(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, |
| 190 | const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, |
| 191 | const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, |
| 192 | VkResult result, void* crtpl_state_data); |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 193 | void PreCallRecordDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator); |
| 194 | bool InstrumentShader(const VkShaderModuleCreateInfo* pCreateInfo, std::vector<unsigned int>& new_pgm, |
| 195 | uint32_t* unique_shader_id); |
| 196 | void PreCallRecordCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, |
| 197 | const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, |
| 198 | void* csm_state_data); |
Tony-LunarG | 1dce239 | 2019-10-23 16:49:29 -0600 | [diff] [blame] | 199 | void AnalyzeAndGenerateMessages(VkCommandBuffer command_buffer, VkQueue queue, VkPipelineBindPoint pipeline_bind_point, |
| 200 | uint32_t operation_index, uint32_t* const debug_output_buffer); |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 201 | void UpdateInstrumentationBuffer(CMD_BUFFER_STATE* cb_node); |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 202 | void PreCallRecordQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence); |
| 203 | void PostCallRecordQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence, |
| 204 | VkResult result); |
| 205 | void PreCallRecordCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, |
| 206 | uint32_t firstInstance); |
| 207 | void PreCallRecordCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, |
| 208 | uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance); |
| 209 | void PreCallRecordCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, |
| 210 | uint32_t stride); |
| 211 | void PreCallRecordCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, |
| 212 | uint32_t stride); |
| 213 | void PreCallRecordCmdDispatch(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z); |
| 214 | void PreCallRecordCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); |
| 215 | void PreCallRecordCmdTraceRaysNV(VkCommandBuffer commandBuffer, VkBuffer raygenShaderBindingTableBuffer, |
| 216 | VkDeviceSize raygenShaderBindingOffset, VkBuffer missShaderBindingTableBuffer, |
| 217 | VkDeviceSize missShaderBindingOffset, VkDeviceSize missShaderBindingStride, |
| 218 | VkBuffer hitShaderBindingTableBuffer, VkDeviceSize hitShaderBindingOffset, |
| 219 | VkDeviceSize hitShaderBindingStride, VkBuffer callableShaderBindingTableBuffer, |
| 220 | VkDeviceSize callableShaderBindingOffset, VkDeviceSize callableShaderBindingStride, |
| 221 | uint32_t width, uint32_t height, uint32_t depth); |
| 222 | void PostCallRecordCmdTraceRaysNV(VkCommandBuffer commandBuffer, VkBuffer raygenShaderBindingTableBuffer, |
| 223 | VkDeviceSize raygenShaderBindingOffset, VkBuffer missShaderBindingTableBuffer, |
| 224 | VkDeviceSize missShaderBindingOffset, VkDeviceSize missShaderBindingStride, |
| 225 | VkBuffer hitShaderBindingTableBuffer, VkDeviceSize hitShaderBindingOffset, |
| 226 | VkDeviceSize hitShaderBindingStride, VkBuffer callableShaderBindingTableBuffer, |
| 227 | VkDeviceSize callableShaderBindingOffset, VkDeviceSize callableShaderBindingStride, |
| 228 | uint32_t width, uint32_t height, uint32_t depth); |
Jeff Bolz | 443c2ca | 2020-03-19 12:11:51 -0500 | [diff] [blame] | 229 | void PreCallRecordCmdTraceRaysKHR(VkCommandBuffer commandBuffer, const VkStridedBufferRegionKHR* pRaygenShaderBindingTable, |
| 230 | const VkStridedBufferRegionKHR* pMissShaderBindingTable, |
| 231 | const VkStridedBufferRegionKHR* pHitShaderBindingTable, |
| 232 | const VkStridedBufferRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, |
| 233 | uint32_t depth); |
| 234 | void PostCallRecordCmdTraceRaysKHR(VkCommandBuffer commandBuffer, const VkStridedBufferRegionKHR* pRaygenShaderBindingTable, |
| 235 | const VkStridedBufferRegionKHR* pMissShaderBindingTable, |
| 236 | const VkStridedBufferRegionKHR* pHitShaderBindingTable, |
| 237 | const VkStridedBufferRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, |
| 238 | uint32_t depth); |
| 239 | void PreCallRecordCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, |
| 240 | const VkStridedBufferRegionKHR* pRaygenShaderBindingTable, |
| 241 | const VkStridedBufferRegionKHR* pMissShaderBindingTable, |
| 242 | const VkStridedBufferRegionKHR* pHitShaderBindingTable, |
| 243 | const VkStridedBufferRegionKHR* pCallableShaderBindingTable, VkBuffer buffer, |
| 244 | VkDeviceSize offset); |
| 245 | void PostCallRecordCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, |
| 246 | const VkStridedBufferRegionKHR* pRaygenShaderBindingTable, |
| 247 | const VkStridedBufferRegionKHR* pMissShaderBindingTable, |
| 248 | const VkStridedBufferRegionKHR* pHitShaderBindingTable, |
| 249 | const VkStridedBufferRegionKHR* pCallableShaderBindingTable, VkBuffer buffer, |
| 250 | VkDeviceSize offset); |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 251 | void AllocateValidationResources(const VkCommandBuffer cmd_buffer, const VkPipelineBindPoint bind_point); |
| 252 | void PostCallRecordGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, |
| 253 | VkPhysicalDeviceProperties* pPhysicalDeviceProperties); |
| 254 | void PostCallRecordGetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, |
| 255 | VkPhysicalDeviceProperties2* pPhysicalDeviceProperties2); |
Tony-LunarG | 2ba1cb3 | 2019-09-25 15:16:11 -0600 | [diff] [blame] | 256 | }; |