summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_render.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-12-03 08:01:19 +0100
committerMarek Olšák <[email protected]>2010-12-03 20:34:56 +0100
commit536d52702034a03d94866cb6cf8fc05502860320 (patch)
treeb8416435fe70570328a5554f37b70e4d89bf0cd2 /src/gallium/drivers/r300/r300_render.c
parentedda44e0dc72302afa04a767772d5d97ab9d9aa6 (diff)
r300g: add capability bit index_bias_supported
.. instead of calling r500_index_bias_supported(..) every draw call.
Diffstat (limited to 'src/gallium/drivers/r300/r300_render.c')
-rw-r--r--src/gallium/drivers/r300/r300_render.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index 2f8b6b83370..07581408ab9 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -118,12 +118,6 @@ static uint32_t r300_provoking_vertex_fixes(struct r300_context *r300,
return color_control;
}
-boolean r500_index_bias_supported(struct r300_context *r300)
-{
- return r300->screen->caps.is_r500 &&
- r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0);
-}
-
void r500_emit_index_bias(struct r300_context *r300, int index_bias)
{
CS_LOCALS(r300);
@@ -193,13 +187,12 @@ static boolean r300_reserve_cs_dwords(struct r300_context *r300,
boolean first_draw = flags & PREP_FIRST_DRAW;
boolean emit_aos = flags & PREP_EMIT_AOS;
boolean emit_aos_swtcl = flags & PREP_EMIT_AOS_SWTCL;
- boolean hw_index_bias = r500_index_bias_supported(r300);
/* Add dirty state, index offset, and AOS. */
if (first_draw) {
cs_dwords += r300_get_num_dirty_dwords(r300);
- if (hw_index_bias)
+ if (r300->screen->caps.index_bias_supported)
cs_dwords += 2; /* emit_index_offset */
if (emit_aos)
@@ -537,7 +530,7 @@ static void r300_draw_range_elements(struct pipe_context* pipe,
int buffer_offset = 0, index_offset = 0; /* for index bias emulation */
unsigned new_offset;
- if (indexBias && !r500_index_bias_supported(r300)) {
+ if (indexBias && !r300->screen->caps.index_bias_supported) {
r300_split_index_bias(r300, indexBias, &buffer_offset, &index_offset);
}