summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_render.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-03-02 17:51:19 +0100
committerMarek Olšák <[email protected]>2011-03-02 17:54:36 +0100
commita6314eb47f0c916c51362dfbd0f1db21e72745ee (patch)
treec4cd3752f0487d879e6d1ef2483b82e215ffc87b /src/gallium/drivers/r300/r300_render.c
parentf6dbcb92bf4a3597c7b3da890ffafc84951f25df (diff)
r300g: require DRM 2.3.0 (kernel 2.6.34)
Running any older kernel is not recommended anyway.
Diffstat (limited to 'src/gallium/drivers/r300/r300_render.c')
-rw-r--r--src/gallium/drivers/r300/r300_render.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index 73ed44cc5a2..0ec4a225865 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -205,7 +205,7 @@ static boolean r300_reserve_cs_dwords(struct r300_context *r300,
if (first_draw) {
cs_dwords += r300_get_num_dirty_dwords(r300);
- if (r300->screen->caps.index_bias_supported)
+ if (r300->screen->caps.is_r500)
cs_dwords += 2; /* emit_index_offset */
if (emit_vertex_arrays)
@@ -257,7 +257,7 @@ static boolean r300_emit_states(struct r300_context *r300,
}
r300_emit_dirty_state(r300);
- if (r300->screen->caps.index_bias_supported) {
+ if (r300->screen->caps.is_r500) {
if (r300->screen->caps.has_tcl)
r500_emit_index_bias(r300, index_bias);
else
@@ -557,7 +557,7 @@ static void r300_draw_elements_immediate(struct r300_context *r300,
OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (count << 16) |
r300_translate_primitive(mode));
- if (indexBias && !r300->screen->caps.index_bias_supported) {
+ if (indexBias && !r300->screen->caps.is_r500) {
for (i = 0; i < count-1; i += 2)
OUT_CS(((ptr1[i+1] + indexBias) << 16) |
(ptr1[i] + indexBias));
@@ -581,7 +581,7 @@ static void r300_draw_elements_immediate(struct r300_context *r300,
OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (count << 16) |
r300_translate_primitive(mode));
- if (indexBias && !r300->screen->caps.index_bias_supported) {
+ if (indexBias && !r300->screen->caps.is_r500) {
for (i = 0; i < count-1; i += 2)
OUT_CS(((ptr2[i+1] + indexBias) << 16) |
(ptr2[i] + indexBias));
@@ -601,7 +601,7 @@ static void r300_draw_elements_immediate(struct r300_context *r300,
R300_VAP_VF_CNTL__INDEX_SIZE_32bit |
r300_translate_primitive(mode));
- if (indexBias && !r300->screen->caps.index_bias_supported) {
+ if (indexBias && !r300->screen->caps.is_r500) {
for (i = 0; i < count; i++)
OUT_CS(ptr4[i] + indexBias);
} else {
@@ -620,13 +620,12 @@ static void r300_draw_elements(struct r300_context *r300, int indexBias,
unsigned indexSize = r300->index_buffer.index_size;
struct pipe_resource* orgIndexBuffer = indexBuffer;
boolean alt_num_verts = r300->screen->caps.is_r500 &&
- count > 65536 &&
- r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0);
+ count > 65536;
unsigned short_count;
int buffer_offset = 0, index_offset = 0; /* for index bias emulation */
uint16_t indices3[3];
- if (indexBias && !r300->screen->caps.index_bias_supported) {
+ if (indexBias && !r300->screen->caps.is_r500) {
r300_split_index_bias(r300, indexBias, &buffer_offset, &index_offset);
}
@@ -702,8 +701,7 @@ static void r300_draw_arrays(struct r300_context *r300, unsigned mode,
unsigned start, unsigned count)
{
boolean alt_num_verts = r300->screen->caps.is_r500 &&
- count > 65536 &&
- r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0);
+ count > 65536;
unsigned short_count;
/* 9 spare dwords for emit_draw_arrays. Give up if the function fails. */