Skip to content
Permalink
Browse files

PixelShaderGen: Don't emit bounding box shader code for old UIDs when…

… disabled

If bounding box is enabled when a UID cache is created, then later disabled,
we shouldn't emit the bounding box portion of the shader.

Fixes pipeline creation errors on D3D12 backend for this case.
  • Loading branch information...
stenzek committed Apr 20, 2019
1 parent 4b1adab commit 96aa762d1ee5bd0294da80ac049a9fcd99032f2a
Showing with 4 additions and 0 deletions.
  1. +4 −0 Source/Core/VideoCommon/PixelShaderGen.cpp
@@ -347,6 +347,10 @@ void ClearUnusedPixelShaderUidBits(APIType ApiType, const ShaderHostConfig& host
// uint output when logic op is not supported (i.e. driver/device does not support D3D11.1).
if (ApiType != APIType::D3D || !host_config.backend_logic_op)
uid_data->uint_output = 0;

// If bounding box is enabled when a UID cache is created, then later disabled, we shouldn't
// emit the bounding box portion of the shader.
uid_data->bounding_box &= host_config.bounding_box;
}

void WritePixelShaderCommonHeader(ShaderCode& out, APIType ApiType, u32 num_texgens,

0 comments on commit 96aa762

Please sign in to comment.
You can’t perform that action at this time.