summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2010-01-12 15:54:13 +0100
committerRoland Scheidegger <[email protected]>2010-01-12 15:54:13 +0100
commita407636efb6c32cee81b9a1525dbc804aacd957b (patch)
tree7d516562ded9d8698592e1f1695604c460d28d6f /src/gallium/drivers
parentcca66dbb59673168d57b4e3499ccc31f4ddc86ad (diff)
gallium: remove point_size_min and point_size_max from rasterizer state
The state tracker is responsible for clamping to any graphics API enforced size min/max limits for both the static point_size setting as well as per vertex point size (in the vertex shader). Note that mesa state tracker didn't actually use these values.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/i965/brw_sf_state.c4
-rw-r--r--src/gallium/drivers/r300/r300_state.c8
-rw-r--r--src/gallium/drivers/svga/svga_context.h3
-rw-r--r--src/gallium/drivers/svga/svga_pipe_rasterizer.c2
-rw-r--r--src/gallium/drivers/svga/svga_screen.c2
-rw-r--r--src/gallium/drivers/svga/svga_state_rss.c5
-rw-r--r--src/gallium/drivers/trace/tr_dump_state.c2
7 files changed, 11 insertions, 15 deletions
diff --git a/src/gallium/drivers/i965/brw_sf_state.c b/src/gallium/drivers/i965/brw_sf_state.c
index 25dc2b52e07..663a688772c 100644
--- a/src/gallium/drivers/i965/brw_sf_state.c
+++ b/src/gallium/drivers/i965/brw_sf_state.c
@@ -126,9 +126,7 @@ sf_unit_populate_key(struct brw_context *brw, struct brw_sf_unit_key *key)
key->point_sprite = rast->point_sprite;
key->point_attenuated = rast->point_size_per_vertex;
- key->point_size = CLAMP(rast->point_size,
- rast->point_size_min,
- rast->point_size_max);
+ key->point_size = rast->point_size;
}
static enum pipe_error
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 78764ddc98e..435e613ddf1 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -618,10 +618,12 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
rs->point_size = pack_float_16_6x(state->point_size) |
(pack_float_16_6x(state->point_size) << R300_POINTSIZE_X_SHIFT);
- rs->point_minmax =
- ((int)(state->point_size_min * 6.0) <<
+ /* set hw limits - clamping done by state tracker in vs or point_size
+ XXX always need to emit this? */
+ rs->point_minmax =
+ ((int)(0.0 * 6.0) <<
R300_GA_POINT_MINMAX_MIN_SHIFT) |
- ((int)(state->point_size_max * 6.0) <<
+ ((int)(4096.0 * 6.0) <<
R300_GA_POINT_MINMAX_MAX_SHIFT);
rs->line_control = pack_float_16_6x(state->line_width) |
diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h
index 66259fd0103..e2a96034d16 100644
--- a/src/gallium/drivers/svga/svga_context.h
+++ b/src/gallium/drivers/svga/svga_context.h
@@ -37,6 +37,7 @@
#define SVGA_TEX_UNITS 8
+#define SVGA_MAX_POINTSIZE 80.0
struct draw_vertex_shader;
struct svga_shader_result;
@@ -145,8 +146,6 @@ struct svga_rasterizer_state {
float slopescaledepthbias;
float depthbias;
float pointsize;
- float pointsize_min;
- float pointsize_max;
unsigned hw_unfilled:16; /* PIPE_POLYGON_MODE_x */
unsigned need_pipeline:16; /* which prims do we need help for? */
diff --git a/src/gallium/drivers/svga/svga_pipe_rasterizer.c b/src/gallium/drivers/svga/svga_pipe_rasterizer.c
index b03f8eb9cf3..b5ecc4c56ca 100644
--- a/src/gallium/drivers/svga/svga_pipe_rasterizer.c
+++ b/src/gallium/drivers/svga/svga_pipe_rasterizer.c
@@ -88,8 +88,6 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
rast->antialiasedlineenable = templ->line_smooth;
rast->lastpixel = templ->line_last_pixel;
rast->pointsize = templ->point_size;
- rast->pointsize_min = templ->point_size_min;
- rast->pointsize_max = templ->point_size_max;
rast->hw_unfilled = PIPE_POLYGON_MODE_FILL;
/* Use swtnl + decomposition implement these:
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index fc1b3c980ef..45b5d85ae22 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -103,7 +103,7 @@ svga_get_paramf(struct pipe_screen *screen, int param)
/* Keep this to a reasonable size to avoid failures in
* conform/pntaa.c:
*/
- return 80.0;
+ return SVGA_MAX_POINTSIZE;
case PIPE_CAP_MAX_TEXTURE_ANISOTROPY:
return 4.0;
diff --git a/src/gallium/drivers/svga/svga_state_rss.c b/src/gallium/drivers/svga/svga_state_rss.c
index 8b6803a285a..c582e445245 100644
--- a/src/gallium/drivers/svga/svga_state_rss.c
+++ b/src/gallium/drivers/svga/svga_state_rss.c
@@ -196,8 +196,9 @@ static int emit_rss( struct svga_context *svga,
EMIT_RS( svga, curr->lastpixel, LASTPIXEL, fail );
EMIT_RS( svga, curr->linepattern, LINEPATTERN, fail );
EMIT_RS_FLOAT( svga, curr->pointsize, POINTSIZE, fail );
- EMIT_RS_FLOAT( svga, curr->pointsize_min, POINTSIZEMIN, fail );
- EMIT_RS_FLOAT( svga, curr->pointsize_max, POINTSIZEMAX, fail );
+ /* XXX still need to set this? */
+ EMIT_RS_FLOAT( svga, 0.0, POINTSIZEMIN, fail );
+ EMIT_RS_FLOAT( svga, SVGA_MAX_POINTSIZE, POINTSIZEMAX, fail );
}
if (dirty & (SVGA_NEW_RAST | SVGA_NEW_FRAME_BUFFER | SVGA_NEW_NEED_PIPELINE))
diff --git a/src/gallium/drivers/trace/tr_dump_state.c b/src/gallium/drivers/trace/tr_dump_state.c
index 86237e03bcc..0e7b7ec123f 100644
--- a/src/gallium/drivers/trace/tr_dump_state.c
+++ b/src/gallium/drivers/trace/tr_dump_state.c
@@ -126,8 +126,6 @@ void trace_dump_rasterizer_state(const struct pipe_rasterizer_state *state)
trace_dump_member(float, state, line_width);
trace_dump_member(float, state, point_size);
- trace_dump_member(float, state, point_size_min);
- trace_dump_member(float, state, point_size_max);
trace_dump_member(float, state, offset_units);
trace_dump_member(float, state, offset_scale);