From ece84120a3ce8e70f3afeb6b7ba5c8e131602ea6 Mon Sep 17 00:00:00 2001 From: Tom Spilman Date: Sat, 6 Jul 2024 17:26:00 -0500 Subject: [PATCH] Fix build. --- .../Platform/Graphics/SamplerStateCollection.DirectX.cs | 4 ++-- .../Platform/Graphics/TextureCollection.DirectX.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MonoGame.Framework/Platform/Graphics/SamplerStateCollection.DirectX.cs b/MonoGame.Framework/Platform/Graphics/SamplerStateCollection.DirectX.cs index c86cce66aaf..b750f935e70 100644 --- a/MonoGame.Framework/Platform/Graphics/SamplerStateCollection.DirectX.cs +++ b/MonoGame.Framework/Platform/Graphics/SamplerStateCollection.DirectX.cs @@ -27,7 +27,7 @@ private void PlatformDirty() internal void PlatformSetSamplers(GraphicsDevice device) { - if (_applyToVertexStage && !device.GraphicsCapabilities.SupportsVertexTextures) + if (_stage == ShaderStage.Vertex && !device.GraphicsCapabilities.SupportsVertexTextures) return; // Skip out if nothing has changed. @@ -37,7 +37,7 @@ internal void PlatformSetSamplers(GraphicsDevice device) // NOTE: We make the assumption here that the caller has // locked the d3dContext for us to use. SharpDX.Direct3D11.CommonShaderStage shaderStage; - if (_applyToVertexStage) + if (_stage == ShaderStage.Vertex) shaderStage = device._d3dContext.VertexShader; else shaderStage = device._d3dContext.PixelShader; diff --git a/MonoGame.Framework/Platform/Graphics/TextureCollection.DirectX.cs b/MonoGame.Framework/Platform/Graphics/TextureCollection.DirectX.cs index 1dffcacdd43..d6048d9d5f6 100644 --- a/MonoGame.Framework/Platform/Graphics/TextureCollection.DirectX.cs +++ b/MonoGame.Framework/Platform/Graphics/TextureCollection.DirectX.cs @@ -12,10 +12,10 @@ void PlatformInit() internal void ClearTargets(GraphicsDevice device, RenderTargetBinding[] targets) { - if (_applyToVertexStage && !device.GraphicsCapabilities.SupportsVertexTextures) + if (_stage == ShaderStage.Vertex && !device.GraphicsCapabilities.SupportsVertexTextures) return; - if (_applyToVertexStage) + if (_stage == ShaderStage.Vertex) ClearTargets(targets, device._d3dContext.VertexShader); else ClearTargets(targets, device._d3dContext.PixelShader); @@ -59,7 +59,7 @@ void PlatformSetTextures(GraphicsDevice device) // NOTE: We make the assumption here that the caller has // locked the d3dContext for us to use. SharpDX.Direct3D11.CommonShaderStage shaderStage; - if (_applyToVertexStage) + if (_stage == ShaderStage.Vertex) shaderStage = device._d3dContext.VertexShader; else shaderStage = device._d3dContext.PixelShader;