diff --git a/renderdoc/driver/vulkan/Makefile b/renderdoc/driver/vulkan/Makefile index 61a2f12b4..6ff99dc0a 100644 --- a/renderdoc/driver/vulkan/Makefile +++ b/renderdoc/driver/vulkan/Makefile @@ -14,6 +14,7 @@ vk_core.o \ vk_hooks_linux.o \ vk_manager.o \ vk_replay.o \ +vk_info.o \ vk_replay_linux.o \ vk_resources.o \ diff --git a/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj b/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj index f17ea7ee3..dcc48fca7 100644 --- a/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj +++ b/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj @@ -25,6 +25,7 @@ true + @@ -48,6 +49,7 @@ + @@ -197,4 +199,4 @@ - + \ No newline at end of file diff --git a/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj.filters b/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj.filters index e59d29c7b..70f73030c 100644 --- a/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj.filters +++ b/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj.filters @@ -10,6 +10,7 @@ + @@ -19,5 +20,6 @@ + - + \ No newline at end of file diff --git a/renderdoc/driver/vulkan/vk_core.h b/renderdoc/driver/vulkan/vk_core.h index a55ca2d45..617331aff 100644 --- a/renderdoc/driver/vulkan/vk_core.h +++ b/renderdoc/driver/vulkan/vk_core.h @@ -33,6 +33,7 @@ #include "vk_common.h" #include "vk_hookset.h" +#include "vk_info.h" #include "vk_manager.h" #include "vk_replay.h" @@ -326,6 +327,8 @@ private: }; map m_DescSetInfo; + VulkanCreationInfo m_CreationInfo; + set m_SubmittedFences; static const char *GetChunkName(uint32_t idx); diff --git a/renderdoc/driver/vulkan/vk_info.cpp b/renderdoc/driver/vulkan/vk_info.cpp new file mode 100644 index 000000000..59e368939 --- /dev/null +++ b/renderdoc/driver/vulkan/vk_info.cpp @@ -0,0 +1,29 @@ +/****************************************************************************** + * The MIT License (MIT) + * + * Copyright (c) 2015 Baldur Karlsson + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + ******************************************************************************/ + +#include "vk_info.h" + +void VulkanCreationInfo::Pipeline::Init(const VkGraphicsPipelineCreateInfo* pCreateInfo) +{ +} diff --git a/renderdoc/driver/vulkan/vk_info.h b/renderdoc/driver/vulkan/vk_info.h new file mode 100644 index 000000000..c28d3ff44 --- /dev/null +++ b/renderdoc/driver/vulkan/vk_info.h @@ -0,0 +1,146 @@ +/****************************************************************************** + * The MIT License (MIT) + * + * Copyright (c) 2015 Baldur Karlsson + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + ******************************************************************************/ + +#pragma once + +#include "vk_common.h" +#include "vk_manager.h" + +struct VulkanCreationInfo +{ + struct Pipeline + { + void Init(const VkGraphicsPipelineCreateInfo* pCreateInfo); + + // VkGraphicsPipelineCreateInfo + VkPipelineCreateFlags flags; + + // VkPipelineShaderStageCreateInfo + ResourceId shaders[6]; + + // VkPipelineVertexInputStateCreateInfo + struct Binding + { + uint32_t vbufferBinding; // VKTODO I believe this is the meaning + uint32_t bytestride; + bool perInstance; + }; + vector vertexBindings; + + struct Attribute + { + uint32_t binding; + VkFormat format; + uint32_t byteoffset; + }; + vector vertexAttrs; + + // VkPipelineInputAssemblyStateCreateInfo + VkPrimitiveTopology topology; + bool primitiveRestartEnable; + + // VkPipelineTessellationStateCreateInfo + uint32_t patchControlPoints; + + // VkPipelineViewportStateCreateInfo + uint32_t viewportCount; + + // VkPipelineRasterStateCreateInfo + bool depthClipEnable; + bool rasterizerDiscardEnable; + VkFillMode fillMode; + VkCullMode cullMode; + VkFrontFace frontFace; + + // VkPipelineMultisampleStateCreateInfo + uint32_t rasterSamples; + bool sampleShadingEnable; + float minSampleShading; + VkSampleMask sampleMask; + + // VkPipelineDepthStencilStateCreateInfo + bool depthTestEnable; + bool depthWriteEnable; + VkCompareOp depthCompareOp; + bool depthBoundsEnable; + bool stencilTestEnable; + VkStencilOpState front; + VkStencilOpState back; + + // VkPipelineColorBlendStateCreateInfo + bool alphaToCoverageEnable; + bool logicOpEnable; + VkLogicOp logicOp; + uint32_t attachmentCount; + + struct Attachment + { + bool blendEnable; + + struct BlendOp + { + VkBlend Source; + VkBlend Destination; + VkBlendOp Operation; + } blend, alphaBlend; + + uint8_t channelWriteMask; + }; + vector attachments; + }; + map m_Pipeline; + + struct ViewportScissor + { + vector viewports; + vector scissors; + }; + map m_VPScissor; + + struct Raster + { + float depthBias; + float depthBiasClamp; + float slopeScaledDepthBias; + float lineWidth; + }; + map m_Raster; + + struct Blend + { + float blendConst[4]; + }; + map m_Blend; + + struct DepthStencil + { + float minDepthBounds; + float maxDepthBounds; + uint32_t stencilReadMask; + uint32_t stencilWriteMask; + uint32_t stencilFrontRef; + uint32_t stencilBackRef; + }; + map m_DepthStencil; +}; \ No newline at end of file