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