From 329ffab6b8dab0bc736432cc4423373a5c97daa9 Mon Sep 17 00:00:00 2001 From: Caleb Cornett Date: Sat, 19 Nov 2022 11:59:38 -0500 Subject: [PATCH] Remove SRC1 blend factors and depthClampEnable flag --- include/Refresh.h | 7 +------ src/Refresh_Driver_Template.txt | 6 +----- src/Refresh_Driver_Vulkan.c | 10 ++-------- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/include/Refresh.h b/include/Refresh.h index c8f74d9..5ba1825 100644 --- a/include/Refresh.h +++ b/include/Refresh.h @@ -281,11 +281,7 @@ typedef enum Refresh_BlendFactor REFRESH_BLENDFACTOR_ONE_MINUS_DST_ALPHA, REFRESH_BLENDFACTOR_CONSTANT_COLOR, REFRESH_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR, - REFRESH_BLENDFACTOR_SRC_ALPHA_SATURATE, - REFRESH_BLENDFACTOR_SRC1_COLOR, - REFRESH_BLENDFACTOR_ONE_MINUS_SRC1_COLOR, - REFRESH_BLENDFACTOR_SRC1_ALPHA, - REFRESH_BLENDFACTOR_ONE_MINUS_SRC1_ALPHA + REFRESH_BLENDFACTOR_SRC_ALPHA_SATURATE } Refresh_BlendFactor; typedef enum Refresh_ColorComponentFlagBits @@ -484,7 +480,6 @@ typedef struct Refresh_ComputeShaderInfo typedef struct Refresh_RasterizerState { - uint8_t depthClampEnable; Refresh_FillMode fillMode; Refresh_CullMode cullMode; Refresh_FrontFace frontFace; diff --git a/src/Refresh_Driver_Template.txt b/src/Refresh_Driver_Template.txt index 9940069..5c17b1f 100644 --- a/src/Refresh_Driver_Template.txt +++ b/src/Refresh_Driver_Template.txt @@ -126,11 +126,7 @@ static TEMPLATE_BLEND_FACTOR_TYPE RefreshToTEMPLATE_BlendFactor[] = 0, /* ONE_MINUS_DST_ALPHA */ 0, /* CONSTANT_COLOR */ 0, /* ONE_MINUS_CONSTANT_COLOR */ - 0, /* SRC_ALPHA_SATURATE */ - 0, /* SRC1_COLOR */ - 0, /* ONE_MINUS_SRC1_COLOR */ - 0, /* SRC1_ALPHA */ - 0 /* ONE_MINUS_SRC1_ALPHA */ + 0 /* SRC_ALPHA_SATURATE */ }; static TEMPLATE_BLEND_OP_TYPE RefreshToTEMPLATE_BlendOp[] = diff --git a/src/Refresh_Driver_Vulkan.c b/src/Refresh_Driver_Vulkan.c index aa3df32..98c45a5 100644 --- a/src/Refresh_Driver_Vulkan.c +++ b/src/Refresh_Driver_Vulkan.c @@ -287,11 +287,7 @@ static VkBlendFactor RefreshToVK_BlendFactor[] = VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, - VK_BLEND_FACTOR_SRC_ALPHA_SATURATE, - VK_BLEND_FACTOR_SRC1_COLOR, - VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, - VK_BLEND_FACTOR_SRC1_ALPHA, - VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA + VK_BLEND_FACTOR_SRC_ALPHA_SATURATE }; static VkBlendOp RefreshToVK_BlendOp[] = @@ -6137,7 +6133,7 @@ static Refresh_GraphicsPipeline* VULKAN_CreateGraphicsPipeline( rasterizationStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; rasterizationStateCreateInfo.pNext = NULL; rasterizationStateCreateInfo.flags = 0; - rasterizationStateCreateInfo.depthClampEnable = pipelineCreateInfo->rasterizerState.depthClampEnable; + rasterizationStateCreateInfo.depthClampEnable = VK_FALSE; rasterizationStateCreateInfo.rasterizerDiscardEnable = VK_FALSE; rasterizationStateCreateInfo.polygonMode = RefreshToVK_PolygonMode[ pipelineCreateInfo->rasterizerState.fillMode @@ -10539,9 +10535,7 @@ static uint8_t VULKAN_INTERNAL_CreateLogicalDevice( /* specifying used device features */ SDL_zero(deviceFeatures); - deviceFeatures.occlusionQueryPrecise = VK_TRUE; deviceFeatures.fillModeNonSolid = VK_TRUE; - deviceFeatures.depthClamp = VK_TRUE; deviceFeatures.samplerAnisotropy = VK_TRUE; /* creating the logical device */