memset(dsa, 0, sizeof(*dsa));
memset(&sr, 0, sizeof(sr));
- if (ctx->Depth.Test && ctx->DrawBuffer->Visual.depthBits > 0) {
- dsa->depth.enabled = 1;
- dsa->depth.writemask = ctx->Depth.Mask;
- dsa->depth.func = st_compare_func_to_pipe(ctx->Depth.Func);
+ if (ctx->DrawBuffer->Visual.depthBits > 0) {
+ if (ctx->Depth.Test) {
+ dsa->depth.enabled = 1;
+ dsa->depth.writemask = ctx->Depth.Mask;
+ dsa->depth.func = st_compare_func_to_pipe(ctx->Depth.Func);
+ }
+ if (ctx->Depth.BoundsTest) {
+ dsa->depth.bounds_test = 1;
+ dsa->depth.bounds_min = ctx->Depth.BoundsMin;
+ dsa->depth.bounds_max = ctx->Depth.BoundsMax;
+ }
}
if (ctx->Stencil.Enabled && ctx->DrawBuffer->Visual.stencilBits > 0) {
{ o(ARB_texture_view), PIPE_CAP_SAMPLER_VIEW_TARGET },
{ o(ARB_clip_control), PIPE_CAP_CLIP_HALFZ },
{ o(EXT_polygon_offset_clamp), PIPE_CAP_POLYGON_OFFSET_CLAMP },
+ { o(EXT_depth_bounds_test), PIPE_CAP_DEPTH_BOUNDS_TEST },
};
/* Required: render target and sampler support */