Skip to content

Commit

Permalink
Fix build.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomspilman committed Jul 6, 2024
1 parent b6a7322 commit ece8412
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ece8412

Please sign in to comment.