mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 19:24:10 +01:00
[dxvk] Remove unused rasterizer discard state flag
This commit is contained in:
parent
060cd1d87c
commit
4f28d57352
@ -8,9 +8,6 @@ namespace dxvk {
|
||||
const D3D11_RASTERIZER_DESC1& desc)
|
||||
: m_device(device), m_desc(desc) {
|
||||
|
||||
// State that is not supported in D3D11
|
||||
m_state.enableDiscard = VK_FALSE;
|
||||
|
||||
// Polygon mode. Determines whether the rasterizer fills
|
||||
// a polygon or renders lines connecting the vertices.
|
||||
m_state.polygonMode = VK_POLYGON_MODE_FILL;
|
||||
@ -50,10 +47,7 @@ namespace dxvk {
|
||||
m_state.depthBiasConstant = static_cast<float>(desc.DepthBias);
|
||||
m_state.depthBiasClamp = desc.DepthBiasClamp;
|
||||
m_state.depthBiasSlope = desc.SlopeScaledDepthBias;
|
||||
m_state.enableDepthClamp = desc.DepthClipEnable ? VK_FALSE : VK_TRUE;
|
||||
|
||||
if (!desc.DepthClipEnable)
|
||||
Logger::warn("D3D11RasterizerState: Depth clamp not properly supported");
|
||||
m_state.depthClampEnable = desc.DepthClipEnable ? VK_FALSE : VK_TRUE;
|
||||
|
||||
if (desc.AntialiasedLineEnable)
|
||||
Logger::err("D3D11RasterizerState: Antialiased lines not supported");
|
||||
|
@ -52,11 +52,10 @@ namespace dxvk {
|
||||
0, nullptr, 0, nullptr);
|
||||
|
||||
DxvkRasterizerState rsState;
|
||||
rsState.enableDepthClamp = VK_FALSE;
|
||||
rsState.enableDiscard = VK_FALSE;
|
||||
rsState.polygonMode = VK_POLYGON_MODE_FILL;
|
||||
rsState.cullMode = VK_CULL_MODE_BACK_BIT;
|
||||
rsState.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE;
|
||||
rsState.depthClampEnable = VK_FALSE;
|
||||
rsState.depthBiasEnable = VK_FALSE;
|
||||
rsState.depthBiasConstant = 0.0f;
|
||||
rsState.depthBiasClamp = 0.0f;
|
||||
|
@ -40,11 +40,10 @@ namespace dxvk {
|
||||
* rasterizer, including the depth bias.
|
||||
*/
|
||||
struct DxvkRasterizerState {
|
||||
VkBool32 enableDepthClamp;
|
||||
VkBool32 enableDiscard;
|
||||
VkPolygonMode polygonMode;
|
||||
VkCullModeFlags cullMode;
|
||||
VkFrontFace frontFace;
|
||||
VkBool32 depthClampEnable;
|
||||
VkBool32 depthBiasEnable;
|
||||
float depthBiasConstant;
|
||||
float depthBiasClamp;
|
||||
|
@ -1581,12 +1581,11 @@ namespace dxvk {
|
||||
|
||||
|
||||
void DxvkContext::setRasterizerState(const DxvkRasterizerState& rs) {
|
||||
m_state.gp.state.rsEnableDepthClamp = rs.enableDepthClamp;
|
||||
m_state.gp.state.rsEnableDiscard = rs.enableDiscard;
|
||||
m_state.gp.state.rsDepthClampEnable = rs.depthClampEnable;
|
||||
m_state.gp.state.rsDepthBiasEnable = rs.depthBiasEnable;
|
||||
m_state.gp.state.rsPolygonMode = rs.polygonMode;
|
||||
m_state.gp.state.rsCullMode = rs.cullMode;
|
||||
m_state.gp.state.rsFrontFace = rs.frontFace;
|
||||
m_state.gp.state.rsDepthBiasEnable = rs.depthBiasEnable;
|
||||
|
||||
m_state.ds.depthBiasConstant = rs.depthBiasConstant;
|
||||
m_state.ds.depthBiasClamp = rs.depthBiasClamp;
|
||||
|
@ -285,8 +285,8 @@ namespace dxvk {
|
||||
rsInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
|
||||
rsInfo.pNext = nullptr;
|
||||
rsInfo.flags = 0;
|
||||
rsInfo.depthClampEnable = state.rsEnableDepthClamp;
|
||||
rsInfo.rasterizerDiscardEnable= state.rsEnableDiscard;
|
||||
rsInfo.depthClampEnable = state.rsDepthClampEnable;
|
||||
rsInfo.rasterizerDiscardEnable= VK_FALSE;
|
||||
rsInfo.polygonMode = state.rsPolygonMode;
|
||||
rsInfo.cullMode = state.rsCullMode;
|
||||
rsInfo.frontFace = state.rsFrontFace;
|
||||
|
@ -47,12 +47,11 @@ namespace dxvk {
|
||||
VkVertexInputBindingDescription ilBindings[DxvkLimits::MaxNumVertexBindings];
|
||||
uint32_t ilDivisors[DxvkLimits::MaxNumVertexBindings];
|
||||
|
||||
VkBool32 rsEnableDepthClamp;
|
||||
VkBool32 rsEnableDiscard;
|
||||
VkBool32 rsDepthClampEnable;
|
||||
VkBool32 rsDepthBiasEnable;
|
||||
VkPolygonMode rsPolygonMode;
|
||||
VkCullModeFlags rsCullMode;
|
||||
VkFrontFace rsFrontFace;
|
||||
VkBool32 rsDepthBiasEnable;
|
||||
uint32_t rsViewportCount;
|
||||
|
||||
VkSampleCountFlagBits msSampleCount;
|
||||
|
@ -177,11 +177,10 @@ namespace dxvk::hud {
|
||||
|
||||
void Hud::setupConstantState() {
|
||||
DxvkRasterizerState rsState;
|
||||
rsState.enableDepthClamp = VK_FALSE;
|
||||
rsState.enableDiscard = VK_FALSE;
|
||||
rsState.polygonMode = VK_POLYGON_MODE_FILL;
|
||||
rsState.cullMode = VK_CULL_MODE_BACK_BIT;
|
||||
rsState.frontFace = VK_FRONT_FACE_CLOCKWISE;
|
||||
rsState.depthClampEnable = VK_FALSE;
|
||||
rsState.depthBiasEnable = VK_FALSE;
|
||||
rsState.depthBiasConstant = 0.0f;
|
||||
rsState.depthBiasClamp = 0.0f;
|
||||
|
Loading…
Reference in New Issue
Block a user