diff options
| author | weihuoya <zwdreams@gmail.com> | 2019-05-09 17:30:17 +0800 |
|---|---|---|
| committer | weihuoya <zwdreams@gmail.com> | 2019-05-09 17:30:17 +0800 |
| commit | e98f43d2af4eb96735902c2c229b3f0ee48770e5 (patch) | |
| tree | d3b1aa52160e2defd6a679ed035ab9e9ea3355fb /Source/Core/VideoCommon/PixelShaderGen.cpp | |
| parent | 5ca993330729935ada1b7c2f027be77994e5fcdd (diff) | |
bbox minor fx
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/PixelShaderGen.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index c5d7086ef7..314eab9995 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -350,7 +350,7 @@ void ClearUnusedPixelShaderUidBits(APIType ApiType, const ShaderHostConfig& host // 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; + uid_data->bounding_box &= host_config.bounding_box & host_config.backend_bbox; } void WritePixelShaderCommonHeader(ShaderCode& out, APIType ApiType, u32 num_texgens, @@ -463,15 +463,15 @@ SSBO_BINDING(0) buffer BBox { }; #endif -void UpdateBoundingBoxBuffer(float2 min_pos, float2 max_pos) { - if (bbox_left > int(min_pos.x)) - atomicMin(bbox_left, int(min_pos.x)); - if (bbox_right < int(max_pos.x)) - atomicMax(bbox_right, int(max_pos.x)); - if (bbox_top > int(min_pos.y)) - atomicMin(bbox_top, int(min_pos.y)); - if (bbox_bottom < int(max_pos.y)) - atomicMax(bbox_bottom, int(max_pos.y)); +void UpdateBoundingBoxBuffer(int2 min_pos, int2 max_pos) { + if (bbox_left > min_pos.x) + atomicMin(bbox_left, min_pos.x); + if (bbox_right < max_pos.x) + atomicMax(bbox_right, max_pos.x); + if (bbox_top > min_pos.y) + atomicMin(bbox_top, min_pos.y); + if (bbox_bottom < max_pos.y) + atomicMax(bbox_bottom, max_pos.y); } void UpdateBoundingBox(float2 rawpos) { |
