summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2010-02-22 21:36:22 +0100
committerMichal Krol <michal@vmware.com>2010-02-22 21:36:22 +0100
commit63cb6f59eac91ba34cf80ff3736568e40b094fe1 (patch)
treea5172db4e43c41654ed038079b745ca67474ddd8 /src/gallium/drivers/r300
parent2467354842d7118efff73165ddaaf4c519b41e46 (diff)
gallium: Remove bypass_vs_clip_and_viewport from rasteriser state.
Needs testing.
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r--src/gallium/drivers/r300/r300_context.h2
-rw-r--r--src/gallium/drivers/r300/r300_emit.c46
-rw-r--r--src/gallium/drivers/r300/r300_state.c5
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.c8
4 files changed, 18 insertions, 43 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 443af4ec2e..2f056aafcb 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -337,8 +337,6 @@ struct r300_context {
uint32_t dirty_state;
/* Flag indicating whether or not the HW is dirty. */
uint32_t dirty_hw;
- /* Whether the TCL engine should be in bypass mode. */
- boolean tcl_bypass;
/* Whether polygon offset is enabled. */
boolean polygon_offset_enabled;
/* Z buffer bit depth. */
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index f7dcd8dc52..37ebe6c49d 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -170,23 +170,15 @@ static const float * get_shader_constant(
break;
case RC_STATE_R300_VIEWPORT_SCALE:
- if (r300->tcl_bypass) {
- vec[0] = 1;
- vec[1] = 1;
- vec[2] = 1;
- } else {
- vec[0] = viewport->xscale;
- vec[1] = viewport->yscale;
- vec[2] = viewport->zscale;
- }
+ vec[0] = viewport->xscale;
+ vec[1] = viewport->yscale;
+ vec[2] = viewport->zscale;
break;
case RC_STATE_R300_VIEWPORT_OFFSET:
- if (!r300->tcl_bypass) {
- vec[0] = viewport->xoffset;
- vec[1] = viewport->yoffset;
- vec[2] = viewport->zoffset;
- }
+ vec[0] = viewport->xoffset;
+ vec[1] = viewport->yoffset;
+ vec[2] = viewport->zoffset;
break;
default:
@@ -936,22 +928,16 @@ void r300_emit_viewport_state(struct r300_context* r300, void* state)
struct r300_viewport_state* viewport = (struct r300_viewport_state*)state;
CS_LOCALS(r300);
- if (r300->tcl_bypass) {
- BEGIN_CS(2);
- OUT_CS_REG(R300_VAP_VTE_CNTL, 0);
- END_CS;
- } else {
- BEGIN_CS(9);
- OUT_CS_REG_SEQ(R300_SE_VPORT_XSCALE, 6);
- OUT_CS_32F(viewport->xscale);
- OUT_CS_32F(viewport->xoffset);
- OUT_CS_32F(viewport->yscale);
- OUT_CS_32F(viewport->yoffset);
- OUT_CS_32F(viewport->zscale);
- OUT_CS_32F(viewport->zoffset);
- OUT_CS_REG(R300_VAP_VTE_CNTL, viewport->vte_control);
- END_CS;
- }
+ BEGIN_CS(9);
+ OUT_CS_REG_SEQ(R300_SE_VPORT_XSCALE, 6);
+ OUT_CS_32F(viewport->xscale);
+ OUT_CS_32F(viewport->xoffset);
+ OUT_CS_32F(viewport->yscale);
+ OUT_CS_32F(viewport->yoffset);
+ OUT_CS_32F(viewport->zscale);
+ OUT_CS_32F(viewport->zoffset);
+ OUT_CS_REG(R300_VAP_VTE_CNTL, viewport->vte_control);
+ END_CS;
}
void r300_emit_texture_count(struct r300_context* r300)
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 34bf81c193..3550c69c46 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -711,8 +711,7 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
/* If bypassing TCL, or if no TCL engine is present, turn off the HW TCL.
* Else, enable HW TCL and force Draw's TCL off. */
- if (state->bypass_vs_clip_and_viewport ||
- !r300screen->caps->has_tcl) {
+ if (!r300screen->caps->has_tcl) {
rs->vap_control_status |= R300_VAP_TCL_BYPASS;
}
@@ -824,10 +823,8 @@ static void r300_bind_rs_state(struct pipe_context* pipe, void* state)
}
if (rs) {
- r300->tcl_bypass = rs->rs.bypass_vs_clip_and_viewport;
r300->polygon_offset_enabled = rs->rs.offset_cw || rs->rs.offset_ccw;
} else {
- r300->tcl_bypass = FALSE;
r300->polygon_offset_enabled = FALSE;
}
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index 2cbce9210a..778eaaacd9 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -114,13 +114,7 @@ static void r300_vertex_psc(struct r300_context* r300)
int identity[16] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
int* stream_tab;
- /* If TCL is bypassed, map vertex streams to equivalent VS output
- * locations. */
- if (r300->tcl_bypass) {
- stream_tab = r300->vs->stream_loc_notcl;
- } else {
- stream_tab = identity;
- }
+ stream_tab = identity;
/* Vertex shaders have no semantics on their inputs,
* so PSC should just route stuff based on the vertex elements,