diff options
author | Ilia Mirkin <[email protected]> | 2016-11-01 16:45:13 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-11-08 19:28:35 -0500 |
commit | bef4a48d1c68d74ad42d242483f440b5256e7adf (patch) | |
tree | 9f0e30cc8a43a4a8bd2a06d1a37f9dbe7a0580f0 /src/gallium/drivers/swr/swr_state.cpp | |
parent | aa62fa8fb79699e117f0285bd5a045f541aa9771 (diff) |
swr: add support for EXT_depth_bounds_test
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_state.cpp')
-rw-r--r-- | src/gallium/drivers/swr/swr_state.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp index 424bff2284f..451ab5af114 100644 --- a/src/gallium/drivers/swr/swr_state.cpp +++ b/src/gallium/drivers/swr/swr_state.cpp @@ -1205,6 +1205,7 @@ swr_update_derived(struct pipe_context *pipe, struct pipe_depth_state *depth = &(ctx->depth_stencil->depth); struct pipe_stencil_state *stencil = ctx->depth_stencil->stencil; SWR_DEPTH_STENCIL_STATE depthStencilState = {{0}}; + SWR_DEPTH_BOUNDS_STATE depthBoundsState = {0}; /* XXX, incomplete. Need to flesh out stencil & alpha test state struct pipe_stencil_state *front_stencil = @@ -1251,6 +1252,11 @@ swr_update_derived(struct pipe_context *pipe, depthStencilState.depthTestFunc = swr_convert_depth_func(depth->func); depthStencilState.depthWriteEnable = depth->writemask; SwrSetDepthStencilState(ctx->swrContext, &depthStencilState); + + depthBoundsState.depthBoundsTestEnable = depth->bounds_test; + depthBoundsState.depthBoundsTestMinValue = depth->bounds_min; + depthBoundsState.depthBoundsTestMaxValue = depth->bounds_max; + SwrSetDepthBoundsState(ctx->swrContext, &depthBoundsState); } /* Blend State */ |