mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-08 08:40:55 +00:00
Add a struct that stores all the creation info for objects for later use
This commit is contained in:
@@ -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 \
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="vk_hooks_win32.cpp" />
|
||||
<ClCompile Include="vk_info.cpp" />
|
||||
<ClCompile Include="vk_manager.cpp" />
|
||||
<ClCompile Include="vk_replay.cpp" />
|
||||
<ClCompile Include="vk_replay_win32.cpp" />
|
||||
@@ -48,6 +49,7 @@
|
||||
<ClInclude Include="vk_core.h" />
|
||||
<ClInclude Include="vk_hookset.h" />
|
||||
<ClInclude Include="vk_hookset_defs.h" />
|
||||
<ClInclude Include="vk_info.h" />
|
||||
<ClInclude Include="vk_manager.h" />
|
||||
<ClInclude Include="vk_replay.h" />
|
||||
<ClInclude Include="vk_resources.h" />
|
||||
@@ -197,4 +199,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -10,6 +10,7 @@
|
||||
<ClCompile Include="vk_hooks_win32.cpp" />
|
||||
<ClCompile Include="vk_hooks_linux.cpp" />
|
||||
<ClCompile Include="vk_resources.cpp" />
|
||||
<ClCompile Include="vk_info.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="vk_core.h" />
|
||||
@@ -19,5 +20,6 @@
|
||||
<ClInclude Include="vk_replay.h" />
|
||||
<ClInclude Include="vk_resources.h" />
|
||||
<ClInclude Include="vk_common.h" />
|
||||
<ClInclude Include="vk_info.h" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -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<ResourceId, DescriptorSetInfo> m_DescSetInfo;
|
||||
|
||||
VulkanCreationInfo m_CreationInfo;
|
||||
|
||||
set<ResourceId> m_SubmittedFences;
|
||||
|
||||
static const char *GetChunkName(uint32_t idx);
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
@@ -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<Binding> vertexBindings;
|
||||
|
||||
struct Attribute
|
||||
{
|
||||
uint32_t binding;
|
||||
VkFormat format;
|
||||
uint32_t byteoffset;
|
||||
};
|
||||
vector<Attribute> 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<Attachment> attachments;
|
||||
};
|
||||
map<ResourceId, Pipeline> m_Pipeline;
|
||||
|
||||
struct ViewportScissor
|
||||
{
|
||||
vector<VkViewport> viewports;
|
||||
vector<VkRect2D> scissors;
|
||||
};
|
||||
map<ResourceId, ViewportScissor> m_VPScissor;
|
||||
|
||||
struct Raster
|
||||
{
|
||||
float depthBias;
|
||||
float depthBiasClamp;
|
||||
float slopeScaledDepthBias;
|
||||
float lineWidth;
|
||||
};
|
||||
map<ResourceId, Raster> m_Raster;
|
||||
|
||||
struct Blend
|
||||
{
|
||||
float blendConst[4];
|
||||
};
|
||||
map<ResourceId, Blend> m_Blend;
|
||||
|
||||
struct DepthStencil
|
||||
{
|
||||
float minDepthBounds;
|
||||
float maxDepthBounds;
|
||||
uint32_t stencilReadMask;
|
||||
uint32_t stencilWriteMask;
|
||||
uint32_t stencilFrontRef;
|
||||
uint32_t stencilBackRef;
|
||||
};
|
||||
map<ResourceId, DepthStencil> m_DepthStencil;
|
||||
};
|
||||
Reference in New Issue
Block a user