diff options
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_context.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_wide_line.c | 10 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_wide_point.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/hud/hud_context.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/postprocess/pp_program.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_blit.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_dump_state.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_gen_mipmap.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_inlines.h | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_compositor.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_idct.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_matrix_filter.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_mc.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_median_filter.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_zscan.c | 3 |
18 files changed, 39 insertions, 27 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 25f79ae19e6..6caa62ab31b 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -724,7 +724,8 @@ draw_get_rasterizer_no_cull( struct draw_context *draw, rast.scissor = scissor; rast.flatshade = flatshade; rast.front_ccw = 1; - rast.gl_rasterization_rules = draw->rasterizer->gl_rasterization_rules; + rast.half_pixel_center = draw->rasterizer->half_pixel_center; + rast.bottom_edge_rule = draw->rasterizer->bottom_edge_rule; rast.clip_halfz = draw->rasterizer->clip_halfz; draw->rasterizer_no_cull[scissor][flatshade] = diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_line.c b/src/gallium/auxiliary/draw/draw_pipe_wide_line.c index 98da9cfb999..8daefa49ebb 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_wide_line.c +++ b/src/gallium/auxiliary/draw/draw_pipe_wide_line.c @@ -77,11 +77,11 @@ static void wideline_line( struct draw_stage *stage, const float dx = fabsf(pos0[0] - pos2[0]); const float dy = fabsf(pos0[1] - pos2[1]); - const boolean gl_rasterization_rules = - stage->draw->rasterizer->gl_rasterization_rules; + const boolean half_pixel_center = + stage->draw->rasterizer->half_pixel_center; /* small tweak to meet GL specification */ - const float bias = gl_rasterization_rules ? 0.125f : 0.0f; + const float bias = half_pixel_center ? 0.125f : 0.0f; /* * Draw wide line as a quad (two tris) by "stretching" the line along @@ -95,7 +95,7 @@ static void wideline_line( struct draw_stage *stage, pos1[1] = pos1[1] + half_width - bias; pos2[1] = pos2[1] - half_width - bias; pos3[1] = pos3[1] + half_width - bias; - if (gl_rasterization_rules) { + if (half_pixel_center) { if (pos0[0] < pos2[0]) { /* left to right line */ pos0[0] -= 0.5f; @@ -118,7 +118,7 @@ static void wideline_line( struct draw_stage *stage, pos1[0] = pos1[0] + half_width + bias; pos2[0] = pos2[0] - half_width + bias; pos3[0] = pos3[0] + half_width + bias; - if (gl_rasterization_rules) { + if (half_pixel_center) { if (pos0[1] < pos2[1]) { /* top to bottom line */ pos0[1] -= 0.5f; diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c index 0d3fee4bb0d..321106cdb15 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c +++ b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c @@ -207,7 +207,7 @@ widepoint_first_point(struct draw_stage *stage, wide->xbias = 0.0; wide->ybias = 0.0; - if (rast->gl_rasterization_rules) { + if (rast->half_pixel_center) { wide->xbias = 0.125; wide->ybias = -0.125; } diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c index 664c5949e8c..7b871c2952d 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c @@ -108,9 +108,9 @@ static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle, fpme->vertex_size, instance_id_index ); draw_pt_post_vs_prepare( fpme->post_vs, - draw->clip_xy, - draw->clip_z, - draw->clip_user, + draw->clip_xy, + draw->clip_z, + draw->clip_user, draw->guard_band_xy, draw->identity_viewport, draw->rasterizer->clip_halfz, diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c index afa5d4748db..0873e342a2d 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c @@ -159,9 +159,9 @@ llvm_middle_end_prepare( struct draw_pt_middle_end *middle, draw_pt_post_vs_prepare( fpme->post_vs, - draw->clip_xy, - draw->clip_z, - draw->clip_user, + draw->clip_xy, + draw->clip_z, + draw->clip_user, draw->guard_band_xy, draw->identity_viewport, draw->rasterizer->clip_halfz, diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c index 5ba80a15ac3..de032b6ba82 100644 --- a/src/gallium/auxiliary/hud/hud_context.c +++ b/src/gallium/auxiliary/hud/hud_context.c @@ -990,7 +990,8 @@ hud_create(struct pipe_context *pipe, struct cso_context *cso) } /* rasterizer */ - hud->rasterizer.gl_rasterization_rules = 1; + hud->rasterizer.half_pixel_center = 1; + hud->rasterizer.bottom_edge_rule = 1; hud->rasterizer.depth_clip = 1; hud->rasterizer.line_width = 1; hud->rasterizer.line_last_pixel = 1; diff --git a/src/gallium/auxiliary/postprocess/pp_program.c b/src/gallium/auxiliary/postprocess/pp_program.c index 7044e3453df..9e537a06b3b 100644 --- a/src/gallium/auxiliary/postprocess/pp_program.c +++ b/src/gallium/auxiliary/postprocess/pp_program.c @@ -87,7 +87,8 @@ pp_init_prog(struct pp_queue_t *ppq, struct pipe_context *pipe, PIPE_BLENDFACTOR_INV_SRC_ALPHA; p->rasterizer.cull_face = PIPE_FACE_NONE; - p->rasterizer.gl_rasterization_rules = 1; + p->rasterizer.half_pixel_center = 1; + p->rasterizer.bottom_edge_rule = 1; p->rasterizer.depth_clip = 1; p->sampler.wrap_s = p->sampler.wrap_t = p->sampler.wrap_r = diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c index 9fe15b8108a..cda66d15749 100644 --- a/src/gallium/auxiliary/util/u_blit.c +++ b/src/gallium/auxiliary/util/u_blit.c @@ -118,7 +118,8 @@ util_create_blit(struct pipe_context *pipe, struct cso_context *cso) /* rasterizer */ ctx->rasterizer.cull_face = PIPE_FACE_NONE; - ctx->rasterizer.gl_rasterization_rules = 1; + ctx->rasterizer.half_pixel_center = 1; + ctx->rasterizer.bottom_edge_rule = 1; ctx->rasterizer.depth_clip = 1; /* samplers */ diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 85e1e979120..2acc5afc2b8 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -239,7 +239,8 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe) /* rasterizer state */ memset(&rs_state, 0, sizeof(rs_state)); rs_state.cull_face = PIPE_FACE_NONE; - rs_state.gl_rasterization_rules = 1; + rs_state.half_pixel_center = 1; + rs_state.bottom_edge_rule = 1; rs_state.flatshade = 1; rs_state.depth_clip = 1; ctx->rs_state = pipe->create_rasterizer_state(pipe, &rs_state); diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c index 2f28f3c84de..12f1d2d6e0c 100644 --- a/src/gallium/auxiliary/util/u_dump_state.c +++ b/src/gallium/auxiliary/util/u_dump_state.c @@ -327,7 +327,8 @@ util_dump_rasterizer_state(FILE *stream, const struct pipe_rasterizer_state *sta util_dump_member(stream, uint, state, line_stipple_pattern); util_dump_member(stream, bool, state, line_last_pixel); util_dump_member(stream, bool, state, flatshade_first); - util_dump_member(stream, bool, state, gl_rasterization_rules); + util_dump_member(stream, bool, state, half_pixel_center); + util_dump_member(stream, bool, state, bottom_edge_rule); util_dump_member(stream, bool, state, rasterizer_discard); util_dump_member(stream, bool, state, depth_clip); util_dump_member(stream, uint, state, clip_plane_enable); diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c index e1f18f39c05..7974b1d7612 100644 --- a/src/gallium/auxiliary/util/u_gen_mipmap.c +++ b/src/gallium/auxiliary/util/u_gen_mipmap.c @@ -1271,7 +1271,8 @@ util_create_gen_mipmap(struct pipe_context *pipe, /* rasterizer */ memset(&ctx->rasterizer, 0, sizeof(ctx->rasterizer)); ctx->rasterizer.cull_face = PIPE_FACE_NONE; - ctx->rasterizer.gl_rasterization_rules = 1; + ctx->rasterizer.half_pixel_center = 1; + ctx->rasterizer.bottom_edge_rule = 1; ctx->rasterizer.depth_clip = 1; /* sampler state */ diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index 7770cd5148e..6e65ee6c983 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -485,8 +485,7 @@ util_get_min_point_size(const struct pipe_rasterizer_state *state) { /* The point size should be clamped to this value at the rasterizer stage. */ - return state->gl_rasterization_rules && - !state->point_quad_rasterization && + return !state->point_quad_rasterization && !state->point_smooth && !state->multisample ? 1.0f : 0.0f; } diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index fecf3c9287f..0df2b570d00 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.c +++ b/src/gallium/auxiliary/vl/vl_compositor.c @@ -453,7 +453,8 @@ init_pipe_state(struct vl_compositor *c) rast.point_size_per_vertex = 1; rast.offset_units = 1; rast.offset_scale = 1; - rast.gl_rasterization_rules = 1; + rast.half_pixel_center = 1; + rast.bottom_edge_rule = 1; rast.depth_clip = 1; c->rast = c->pipe->create_rasterizer_state(c->pipe, &rast); diff --git a/src/gallium/auxiliary/vl/vl_idct.c b/src/gallium/auxiliary/vl/vl_idct.c index a0c243f809a..bd73dfd40f7 100644 --- a/src/gallium/auxiliary/vl/vl_idct.c +++ b/src/gallium/auxiliary/vl/vl_idct.c @@ -516,7 +516,8 @@ init_state(struct vl_idct *idct) memset(&rs_state, 0, sizeof(rs_state)); rs_state.point_size = 1; - rs_state.gl_rasterization_rules = true; + rs_state.half_pixel_center = true; + rs_state.bottom_edge_rule = true; rs_state.depth_clip = 1; idct->rs_state = idct->pipe->create_rasterizer_state(idct->pipe, &rs_state); if (!idct->rs_state) diff --git a/src/gallium/auxiliary/vl/vl_matrix_filter.c b/src/gallium/auxiliary/vl/vl_matrix_filter.c index 438bedab226..cda90ff10eb 100644 --- a/src/gallium/auxiliary/vl/vl_matrix_filter.c +++ b/src/gallium/auxiliary/vl/vl_matrix_filter.c @@ -168,7 +168,8 @@ vl_matrix_filter_init(struct vl_matrix_filter *filter, struct pipe_context *pipe filter->pipe = pipe; memset(&rs_state, 0, sizeof(rs_state)); - rs_state.gl_rasterization_rules = true; + rs_state.half_pixel_center = true; + rs_state.bottom_edge_rule = true; rs_state.depth_clip = 1; filter->rs_state = pipe->create_rasterizer_state(pipe, &rs_state); if (!filter->rs_state) diff --git a/src/gallium/auxiliary/vl/vl_mc.c b/src/gallium/auxiliary/vl/vl_mc.c index d395cc2d57c..b4272093655 100644 --- a/src/gallium/auxiliary/vl/vl_mc.c +++ b/src/gallium/auxiliary/vl/vl_mc.c @@ -428,7 +428,8 @@ init_pipe_state(struct vl_mc *r) rs_state.sprite_coord_mode = PIPE_SPRITE_COORD_UPPER_LEFT; rs_state.point_quad_rasterization = true; rs_state.point_size = VL_BLOCK_WIDTH; - rs_state.gl_rasterization_rules = true; + rs_state.half_pixel_center = true; + rs_state.bottom_edge_rule = true; rs_state.depth_clip = 1; r->rs_state = r->pipe->create_rasterizer_state(r->pipe, &rs_state); if (!r->rs_state) diff --git a/src/gallium/auxiliary/vl/vl_median_filter.c b/src/gallium/auxiliary/vl/vl_median_filter.c index dfa280a6d2a..2db147904b8 100644 --- a/src/gallium/auxiliary/vl/vl_median_filter.c +++ b/src/gallium/auxiliary/vl/vl_median_filter.c @@ -254,7 +254,8 @@ vl_median_filter_init(struct vl_median_filter *filter, struct pipe_context *pipe filter->pipe = pipe; memset(&rs_state, 0, sizeof(rs_state)); - rs_state.gl_rasterization_rules = true; + rs_state.half_pixel_center = true; + rs_state.bottom_edge_rule = true; rs_state.depth_clip = 1; filter->rs_state = pipe->create_rasterizer_state(pipe, &rs_state); if (!filter->rs_state) diff --git a/src/gallium/auxiliary/vl/vl_zscan.c b/src/gallium/auxiliary/vl/vl_zscan.c index 53c2e801c2d..262fb0dc491 100644 --- a/src/gallium/auxiliary/vl/vl_zscan.c +++ b/src/gallium/auxiliary/vl/vl_zscan.c @@ -270,7 +270,8 @@ init_state(struct vl_zscan *zscan) assert(zscan); memset(&rs_state, 0, sizeof(rs_state)); - rs_state.gl_rasterization_rules = true; + rs_state.half_pixel_center = true; + rs_state.bottom_edge_rule = true; rs_state.depth_clip = 1; zscan->rs_state = zscan->pipe->create_rasterizer_state(zscan->pipe, &rs_state); if (!zscan->rs_state) |