Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
TheIronWolfModding committed Aug 18, 2024
1 parent 554c657 commit 29a3fc8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/d3d9/d3d9_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2540,8 +2540,10 @@ namespace dxvk {


HRESULT STDMETHODCALLTYPE D3D9DeviceEx::SetTexture(DWORD Stage, IDirect3DBaseTexture9* pTexture) {
#ifdef GTR2_SPECIFIC_VALIDATE_PARAMS
if (unlikely(InvalidSampler(Stage)))
return D3D_OK;
#endif // GTR2_SPECIFIC_VALIDATE_PARAMS

DWORD stateSampler = RemapSamplerState(Stage);

Expand Down Expand Up @@ -2600,8 +2602,10 @@ namespace dxvk {
DWORD Sampler,
D3DSAMPLERSTATETYPE Type,
DWORD Value) {
#ifdef GTR2_SPECIFIC_VALIDATE_PARAMS
if (unlikely(InvalidSampler(Sampler)))
return D3D_OK;
#endif // GTR2_SPECIFIC_VALIDATE_PARAMS

uint32_t stateSampler = RemapSamplerState(Sampler);

Expand Down Expand Up @@ -3341,8 +3345,10 @@ namespace dxvk {
UINT Stride) {
D3D9DeviceLock lock = LockDevice();

#ifdef GTR2_SPECIFIC_VALIDATE_PARAMS
if (unlikely(StreamNumber >= caps::MaxStreams))
return D3DERR_INVALIDCALL;
#endif // GTR2_SPECIFIC_VALIDATE_PARAMS

D3D9VertexBuffer* buffer = static_cast<D3D9VertexBuffer*>(pStreamData);

Expand Down Expand Up @@ -4499,7 +4505,12 @@ namespace dxvk {


bool D3D9DeviceEx::ShouldRecord() {
assert(m_recorder == nullptr);
#ifdef GTR2_SPECIFIC_VALIDATE_PARAMS
return false;
#else
return m_recorder != nullptr && !m_recorder->IsApplying();
#endif // GTR2_SPECIFIC_VALIDATE_PARAMS
}


Expand Down Expand Up @@ -5078,8 +5089,10 @@ namespace dxvk {
DWORD Flags) {
D3D9DeviceLock lock = LockDevice();

#ifdef GTR2_SPECIFIC_VALIDATE_PARAMS
if (unlikely(ppbData == nullptr))
return D3DERR_INVALIDCALL;
#endif // GTR2_SPECIFIC_VALIDATE_PARAMS

auto& desc = *pResource->Desc();

Expand Down

0 comments on commit 29a3fc8

Please sign in to comment.