aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer
diff options
context:
space:
mode:
authorJan Zielinski <[email protected]>2019-07-23 10:30:47 +0200
committerJan Zielinski <[email protected]>2019-07-23 21:55:09 +0200
commitccc6b4f96b012064f2bc74ec7a3465874b24ef8e (patch)
treecf8c021fddc137e714ef5eea28404e4602dddd45 /src/gallium/drivers/swr/rasterizer
parente5b3f0a867bef5cc4880d78d7a63feba6df4872a (diff)
swr/rasterizer: Adding support for unhandled clipEnable state
Clipping is not correctly handled by the rasterizer - fixing this. Reviewed-by: Alok Hota <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer')
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/api.cpp4
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/state.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp
index 228e85a25c9..f9b86cfbb8d 100644
--- a/src/gallium/drivers/swr/rasterizer/core/api.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/api.cpp
@@ -904,8 +904,8 @@ void SetupPipeline(DRAW_CONTEXT* pDC)
};
- // Disable clipper if viewport transform is disabled
- if (pState->state.frontendState.vpTransformDisable)
+ // Disable clipper if viewport transform is disabled or if clipper is disabled
+ if (pState->state.frontendState.vpTransformDisable || !pState->state.rastState.clipEnable)
{
pState->pfnProcessPrims = pfnBinner;
#if USE_SIMD16_FRONTEND
diff --git a/src/gallium/drivers/swr/rasterizer/core/state.h b/src/gallium/drivers/swr/rasterizer/core/state.h
index 3731c41c4e4..e85144c2582 100644
--- a/src/gallium/drivers/swr/rasterizer/core/state.h
+++ b/src/gallium/drivers/swr/rasterizer/core/state.h
@@ -1050,6 +1050,7 @@ struct SWR_RASTSTATE
uint32_t frontWinding : 1;
uint32_t scissorEnable : 1;
uint32_t depthClipEnable : 1;
+ uint32_t clipEnable : 1;
uint32_t clipHalfZ : 1;
uint32_t pointParam : 1;
uint32_t pointSpriteEnable : 1;