summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/UberShaderPixel.cpp
diff options
context:
space:
mode:
authorConnor McLaughlin <stenzek@gmail.com>2019-03-29 19:59:25 +1000
committerGitHub <noreply@github.com>2019-03-29 19:59:25 +1000
commit154eeae8ae1e7105bc06e76dc9ff09884190867e (patch)
tree2a762e414bd8a67bd03330566c1f58686dc5a7ca /Source/Core/VideoCommon/UberShaderPixel.cpp
parent9b6c9252e4dafe91918d91cdabc0c6e27ff9136f (diff)
parent16294acd2ae97fc7efa8e885fbfb83b834c7976d (diff)
Merge pull request #7915 from stenzek/bbox-scaled-update
VideoBackends: Scale bounding box rectangle in the pixel shader
Diffstat (limited to 'Source/Core/VideoCommon/UberShaderPixel.cpp')
-rw-r--r--Source/Core/VideoCommon/UberShaderPixel.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/Source/Core/VideoCommon/UberShaderPixel.cpp b/Source/Core/VideoCommon/UberShaderPixel.cpp
index 1b9695f5ce..097b6456bd 100644
--- a/Source/Core/VideoCommon/UberShaderPixel.cpp
+++ b/Source/Core/VideoCommon/UberShaderPixel.cpp
@@ -1250,24 +1250,9 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
if (bounding_box)
{
- out.Write(" if (bpmem_bounding_box) {\n");
- if (ApiType == APIType::D3D)
- {
- out.Write(
- " if(bbox_data[0] > int(rawpos.x)) InterlockedMin(bbox_data[0], int(rawpos.x));\n"
- " if(bbox_data[1] < int(rawpos.x)) InterlockedMax(bbox_data[1], int(rawpos.x));\n"
- " if(bbox_data[2] > int(rawpos.y)) InterlockedMin(bbox_data[2], int(rawpos.y));\n"
- " if(bbox_data[3] < int(rawpos.y)) InterlockedMax(bbox_data[3], int(rawpos.y));\n");
- }
- else
- {
- out.Write("\tif(bbox_left > int(rawpos.x)) atomicMin(bbox_left, int(rawpos.x));\n"
- "\tif(bbox_right < int(rawpos.x)) atomicMax(bbox_right, int(rawpos.x));\n"
- "\tif(bbox_top > int(rawpos.y)) atomicMin(bbox_top, int(rawpos.y));\n"
- "\tif(bbox_bottom < int(rawpos.y)) atomicMax(bbox_bottom, int(rawpos.y));\n");
- }
-
- out.Write(" }\n");
+ out.Write(" if (bpmem_bounding_box) {\n"
+ " UpdateBoundingBox(rawpos.xy);\n"
+ " }\n");
}
if (use_shader_blend)