mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-02 22:29:16 +01:00
[d3d11] Minor fixes
This commit is contained in:
parent
969b35c80c
commit
ca53fe7925
@ -1721,8 +1721,7 @@ namespace dxvk {
|
|||||||
ID3D11BlendState* pBlendState,
|
ID3D11BlendState* pBlendState,
|
||||||
const FLOAT BlendFactor[4],
|
const FLOAT BlendFactor[4],
|
||||||
UINT SampleMask) {
|
UINT SampleMask) {
|
||||||
Com<D3D11BlendState> blendState =
|
auto blendState = static_cast<D3D11BlendState*>(pBlendState);
|
||||||
static_cast<D3D11BlendState*>(pBlendState);
|
|
||||||
|
|
||||||
if (m_state.om.cbState != blendState
|
if (m_state.om.cbState != blendState
|
||||||
|| m_state.om.sampleMask != SampleMask) {
|
|| m_state.om.sampleMask != SampleMask) {
|
||||||
@ -1744,8 +1743,7 @@ namespace dxvk {
|
|||||||
void STDMETHODCALLTYPE D3D11DeviceContext::OMSetDepthStencilState(
|
void STDMETHODCALLTYPE D3D11DeviceContext::OMSetDepthStencilState(
|
||||||
ID3D11DepthStencilState* pDepthStencilState,
|
ID3D11DepthStencilState* pDepthStencilState,
|
||||||
UINT StencilRef) {
|
UINT StencilRef) {
|
||||||
Com<D3D11DepthStencilState> depthStencilState =
|
auto depthStencilState = static_cast<D3D11DepthStencilState*>(pDepthStencilState);
|
||||||
static_cast<D3D11DepthStencilState*>(pDepthStencilState);
|
|
||||||
|
|
||||||
if (m_state.om.dsState != depthStencilState) {
|
if (m_state.om.dsState != depthStencilState) {
|
||||||
m_state.om.dsState = depthStencilState;
|
m_state.om.dsState = depthStencilState;
|
||||||
@ -1816,8 +1814,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
void STDMETHODCALLTYPE D3D11DeviceContext::RSSetState(ID3D11RasterizerState* pRasterizerState) {
|
void STDMETHODCALLTYPE D3D11DeviceContext::RSSetState(ID3D11RasterizerState* pRasterizerState) {
|
||||||
Com<D3D11RasterizerState> rasterizerState =
|
auto rasterizerState = static_cast<D3D11RasterizerState*>(pRasterizerState);
|
||||||
static_cast<D3D11RasterizerState*>(pRasterizerState);
|
|
||||||
|
|
||||||
if (m_state.rs.state != rasterizerState) {
|
if (m_state.rs.state != rasterizerState) {
|
||||||
m_state.rs.state = rasterizerState;
|
m_state.rs.state = rasterizerState;
|
||||||
@ -2173,12 +2170,14 @@ namespace dxvk {
|
|||||||
DXGI_FORMAT Format) {
|
DXGI_FORMAT Format) {
|
||||||
// As in Vulkan, the index format can be either a 32-bit
|
// As in Vulkan, the index format can be either a 32-bit
|
||||||
// or 16-bit unsigned integer, no other formats are allowed.
|
// or 16-bit unsigned integer, no other formats are allowed.
|
||||||
VkIndexType indexType = VK_INDEX_TYPE_UINT16;
|
VkIndexType indexType = VK_INDEX_TYPE_UINT32;
|
||||||
|
|
||||||
switch (Format) {
|
if (pBuffer != nullptr) {
|
||||||
case DXGI_FORMAT_R16_UINT: indexType = VK_INDEX_TYPE_UINT16; break;
|
switch (Format) {
|
||||||
case DXGI_FORMAT_R32_UINT: indexType = VK_INDEX_TYPE_UINT32; break;
|
case DXGI_FORMAT_R16_UINT: indexType = VK_INDEX_TYPE_UINT16; break;
|
||||||
default: Logger::err(str::format("D3D11: Invalid index format: ", Format));
|
case DXGI_FORMAT_R32_UINT: indexType = VK_INDEX_TYPE_UINT32; break;
|
||||||
|
default: Logger::err(str::format("D3D11: Invalid index format: ", Format));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EmitCs([
|
EmitCs([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user