mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-13 16:08:50 +01:00
[dxvk] Add flat shading parameter to rasterizer state
This commit is contained in:
parent
4f0c217633
commit
0adf64f085
@ -4991,6 +4991,7 @@ namespace dxvk {
|
|||||||
pRsState->depthBiasEnable = VK_FALSE;
|
pRsState->depthBiasEnable = VK_FALSE;
|
||||||
pRsState->conservativeMode = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT;
|
pRsState->conservativeMode = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT;
|
||||||
pRsState->sampleCount = 0;
|
pRsState->sampleCount = 0;
|
||||||
|
pRsState->flatShading = VK_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ namespace dxvk {
|
|||||||
m_state.depthClipEnable = desc.DepthClipEnable;
|
m_state.depthClipEnable = desc.DepthClipEnable;
|
||||||
m_state.conservativeMode = DecodeConservativeRasterizationMode(desc.ConservativeRaster);
|
m_state.conservativeMode = DecodeConservativeRasterizationMode(desc.ConservativeRaster);
|
||||||
m_state.sampleCount = VkSampleCountFlags(desc.ForcedSampleCount);
|
m_state.sampleCount = VkSampleCountFlags(desc.ForcedSampleCount);
|
||||||
|
m_state.flatShading = VK_FALSE;
|
||||||
|
|
||||||
m_depthBias.depthBiasConstant = float(desc.DepthBias);
|
m_depthBias.depthBiasConstant = float(desc.DepthBias);
|
||||||
m_depthBias.depthBiasSlope = desc.SlopeScaledDepthBias;
|
m_depthBias.depthBiasSlope = desc.SlopeScaledDepthBias;
|
||||||
|
@ -5715,14 +5715,12 @@ namespace dxvk {
|
|||||||
|
|
||||||
auto& rs = m_state.renderStates;
|
auto& rs = m_state.renderStates;
|
||||||
|
|
||||||
DxvkRasterizerState state;
|
DxvkRasterizerState state = { };
|
||||||
state.cullMode = DecodeCullMode(D3DCULL(rs[D3DRS_CULLMODE]));
|
state.cullMode = DecodeCullMode(D3DCULL(rs[D3DRS_CULLMODE]));
|
||||||
state.depthBiasEnable = IsDepthBiasEnabled();
|
state.depthBiasEnable = IsDepthBiasEnabled();
|
||||||
state.depthClipEnable = true;
|
state.depthClipEnable = true;
|
||||||
state.frontFace = VK_FRONT_FACE_CLOCKWISE;
|
state.frontFace = VK_FRONT_FACE_CLOCKWISE;
|
||||||
state.polygonMode = DecodeFillMode(D3DFILLMODE(rs[D3DRS_FILLMODE]));
|
state.polygonMode = DecodeFillMode(D3DFILLMODE(rs[D3DRS_FILLMODE]));
|
||||||
state.conservativeMode = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT;
|
|
||||||
state.sampleCount = 0;
|
|
||||||
|
|
||||||
EmitCs([
|
EmitCs([
|
||||||
cState = state
|
cState = state
|
||||||
|
@ -105,6 +105,7 @@ namespace dxvk {
|
|||||||
VkBool32 depthBiasEnable;
|
VkBool32 depthBiasEnable;
|
||||||
VkConservativeRasterizationModeEXT conservativeMode;
|
VkConservativeRasterizationModeEXT conservativeMode;
|
||||||
VkSampleCountFlags sampleCount;
|
VkSampleCountFlags sampleCount;
|
||||||
|
VkBool32 flatShading;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -124,6 +124,7 @@ namespace dxvk {
|
|||||||
rsState.depthBiasEnable = VK_FALSE;
|
rsState.depthBiasEnable = VK_FALSE;
|
||||||
rsState.conservativeMode = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT;
|
rsState.conservativeMode = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT;
|
||||||
rsState.sampleCount = VK_SAMPLE_COUNT_1_BIT;
|
rsState.sampleCount = VK_SAMPLE_COUNT_1_BIT;
|
||||||
|
rsState.flatShading = VK_FALSE;
|
||||||
ctx->setRasterizerState(rsState);
|
ctx->setRasterizerState(rsState);
|
||||||
|
|
||||||
DxvkMultisampleState msState;
|
DxvkMultisampleState msState;
|
||||||
|
@ -22,6 +22,7 @@ namespace dxvk::hud {
|
|||||||
m_rsState.depthBiasEnable = VK_FALSE;
|
m_rsState.depthBiasEnable = VK_FALSE;
|
||||||
m_rsState.conservativeMode = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT;
|
m_rsState.conservativeMode = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT;
|
||||||
m_rsState.sampleCount = VK_SAMPLE_COUNT_1_BIT;
|
m_rsState.sampleCount = VK_SAMPLE_COUNT_1_BIT;
|
||||||
|
m_rsState.flatShading = VK_FALSE;
|
||||||
|
|
||||||
m_blendMode.enableBlending = VK_TRUE;
|
m_blendMode.enableBlending = VK_TRUE;
|
||||||
m_blendMode.colorSrcFactor = VK_BLEND_FACTOR_ONE;
|
m_blendMode.colorSrcFactor = VK_BLEND_FACTOR_ONE;
|
||||||
|
Loading…
Reference in New Issue
Block a user