mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Set up conservative rasterization pNext when setting up pipeline info
This commit is contained in:
@@ -213,6 +213,7 @@ private:
|
||||
enum
|
||||
{
|
||||
VkCheckExt_AMD_neg_viewport,
|
||||
VkCheckExt_EXT_conserv_rast,
|
||||
VkCheckExt_Max,
|
||||
};
|
||||
|
||||
|
||||
@@ -390,7 +390,8 @@ void VulkanShaderCache::MakeGraphicsPipelineInfo(VkGraphicsPipelineCreateInfo &p
|
||||
RDCASSERT(ARRAY_COUNT(scissors) >= pipeInfo.scissors.size());
|
||||
|
||||
static VkPipelineRasterizationStateCreateInfo rs = {
|
||||
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO};
|
||||
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO,
|
||||
};
|
||||
|
||||
rs.depthClampEnable = pipeInfo.depthClampEnable;
|
||||
rs.rasterizerDiscardEnable = pipeInfo.rasterizerDiscardEnable,
|
||||
@@ -403,6 +404,17 @@ void VulkanShaderCache::MakeGraphicsPipelineInfo(VkGraphicsPipelineCreateInfo &p
|
||||
rs.depthBiasSlopeFactor = pipeInfo.depthBiasSlopeFactor;
|
||||
rs.lineWidth = pipeInfo.lineWidth;
|
||||
|
||||
static VkPipelineRasterizationConservativeStateCreateInfoEXT conservRast = {
|
||||
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT,
|
||||
};
|
||||
|
||||
if(m_pDriver->m_ExtensionsEnabled[VkCheckExt_EXT_conserv_rast])
|
||||
{
|
||||
conservRast.conservativeRasterizationMode = pipeInfo.conservativeRasterizationMode;
|
||||
conservRast.extraPrimitiveOverestimationSize = pipeInfo.extraPrimitiveOverestimationSize;
|
||||
rs.pNext = &conservRast;
|
||||
}
|
||||
|
||||
static VkPipelineMultisampleStateCreateInfo msaa = {
|
||||
VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO};
|
||||
|
||||
|
||||
@@ -985,6 +985,10 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
|
||||
VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME) != Extensions.end())
|
||||
m_ExtensionsEnabled[VkCheckExt_AMD_neg_viewport] = true;
|
||||
|
||||
if(std::find(Extensions.begin(), Extensions.end(),
|
||||
VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME) != Extensions.end())
|
||||
m_ExtensionsEnabled[VkCheckExt_EXT_conserv_rast] = true;
|
||||
|
||||
std::vector<string> Layers;
|
||||
for(uint32_t i = 0; i < createInfo.enabledLayerCount; i++)
|
||||
Layers.push_back(createInfo.ppEnabledLayerNames[i]);
|
||||
|
||||
Reference in New Issue
Block a user