mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-11 10:24:10 +01:00
[d3d9] Captured NULL vertex declarations are not applied
This commit is contained in:
parent
28a07ef445
commit
9162aa5fdf
@ -38,6 +38,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE D3D9StateBlock::Capture() {
|
HRESULT STDMETHODCALLTYPE D3D9StateBlock::Capture() {
|
||||||
|
if (m_captures.flags.test(D3D9CapturedStateFlag::VertexDecl))
|
||||||
|
SetVertexDeclaration(m_deviceState->vertexDecl.ptr());
|
||||||
|
|
||||||
ApplyOrCapture<D3D9StateFunction::Capture>();
|
ApplyOrCapture<D3D9StateFunction::Capture>();
|
||||||
|
|
||||||
return D3D_OK;
|
return D3D_OK;
|
||||||
@ -46,6 +49,10 @@ namespace dxvk {
|
|||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE D3D9StateBlock::Apply() {
|
HRESULT STDMETHODCALLTYPE D3D9StateBlock::Apply() {
|
||||||
m_applying = true;
|
m_applying = true;
|
||||||
|
|
||||||
|
if (m_captures.flags.test(D3D9CapturedStateFlag::VertexDecl) && m_state.vertexDecl != nullptr)
|
||||||
|
m_parent->SetVertexDeclaration(m_state.vertexDecl.ptr());
|
||||||
|
|
||||||
ApplyOrCapture<D3D9StateFunction::Apply>();
|
ApplyOrCapture<D3D9StateFunction::Apply>();
|
||||||
m_applying = false;
|
m_applying = false;
|
||||||
|
|
||||||
|
@ -174,9 +174,6 @@ namespace dxvk {
|
|||||||
|
|
||||||
template <typename Dst, typename Src>
|
template <typename Dst, typename Src>
|
||||||
void ApplyOrCapture(Dst* dst, const Src* src) {
|
void ApplyOrCapture(Dst* dst, const Src* src) {
|
||||||
if (m_captures.flags.test(D3D9CapturedStateFlag::VertexDecl))
|
|
||||||
dst->SetVertexDeclaration(src->vertexDecl.ptr());
|
|
||||||
|
|
||||||
if (m_captures.flags.test(D3D9CapturedStateFlag::StreamFreq)) {
|
if (m_captures.flags.test(D3D9CapturedStateFlag::StreamFreq)) {
|
||||||
for (uint32_t stream = m_captures.streamFreq.dword(0); stream; stream &= stream - 1) {
|
for (uint32_t stream = m_captures.streamFreq.dword(0); stream; stream &= stream - 1) {
|
||||||
uint32_t idx = bit::tzcnt(stream);
|
uint32_t idx = bit::tzcnt(stream);
|
||||||
|
Loading…
Reference in New Issue
Block a user