diff options
author | Marek Olšák <[email protected]> | 2018-08-21 21:59:23 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-09-06 21:53:00 -0400 |
commit | daa19363def83c025ccf16106b3402268bf1f56f (patch) | |
tree | 94fd791ebf78e36f29ddf8c8cd665a3731688d6e /src/mesa/state_tracker | |
parent | 7b26741806c521279a1b83f2eae40a277d806626 (diff) |
gallium: split depth_clip into depth_clip_near & depth_clip_far
for AMD_depth_clamp_separate.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom_rasterizer.c | 4 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_bitmap.c | 3 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_clear.c | 3 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c index 1f66b9d0597..2bffa684a25 100644 --- a/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/src/mesa/state_tracker/st_atom_rasterizer.c @@ -294,8 +294,8 @@ st_update_rasterizer(struct st_context *st) } /* _NEW_TRANSFORM */ - raster->depth_clip = !(ctx->Transform.DepthClampNear && - ctx->Transform.DepthClampFar); + raster->depth_clip_near = !ctx->Transform.DepthClampNear; + raster->depth_clip_far = !ctx->Transform.DepthClampFar; raster->clip_plane_enable = ctx->Transform.ClipPlanesEnabled; raster->clip_halfz = (ctx->Transform.ClipDepthMode == GL_ZERO_TO_ONE); diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index babb00178ae..a73d6c7e062 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -560,7 +560,8 @@ init_bitmap_state(struct st_context *st) memset(&st->bitmap.rasterizer, 0, sizeof(st->bitmap.rasterizer)); st->bitmap.rasterizer.half_pixel_center = 1; st->bitmap.rasterizer.bottom_edge_rule = 1; - st->bitmap.rasterizer.depth_clip = 1; + st->bitmap.rasterizer.depth_clip_near = 1; + st->bitmap.rasterizer.depth_clip_far = 1; /* find a usable texture format */ if (screen->is_format_supported(screen, PIPE_FORMAT_I8_UNORM, diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index fbc577a370c..22e85019764 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -71,7 +71,8 @@ st_init_clear(struct st_context *st) st->clear.raster.half_pixel_center = 1; st->clear.raster.bottom_edge_rule = 1; - st->clear.raster.depth_clip = 1; + st->clear.raster.depth_clip_near = 1; + st->clear.raster.depth_clip_far = 1; } diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 67bbb358500..cb50b7104a0 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -677,8 +677,8 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z, ctx->Color._ClampFragmentColor; rasterizer.half_pixel_center = 1; rasterizer.bottom_edge_rule = 1; - rasterizer.depth_clip = !(ctx->Transform.DepthClampNear && - ctx->Transform.DepthClampFar); + rasterizer.depth_clip_near = !ctx->Transform.DepthClampNear; + rasterizer.depth_clip_far = !ctx->Transform.DepthClampFar; rasterizer.scissor = ctx->Scissor.EnableFlags; cso_set_rasterizer(cso, &rasterizer); } |