aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-04-23 17:14:26 -0700
committerEric Anholt <[email protected]>2014-04-30 14:33:20 -0700
commitff9c3e8e5a22597c83505479e918981377f8fdf4 (patch)
treedd21df42cde090b65d94cda00de32d4db6c18d89 /src/mesa/drivers/dri/nouveau
parent62d46332d8ed7a6270bc4e0520cf52668efd33b5 (diff)
mesa: Replace use of _ReallyEnabled as a boolean with use of _Current.
I'm probably not the only person that has tried to kill _ReallyEnabled. This does the mechanical part of the work, and cleans _ReallyEnabled from i965. I think that using _Current makes texture management clearer: You can't have multiple targets in use in the same texture image unit at the same time, because there's just that one pointer. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_context.c4
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_frag.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_tex.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_frag.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_tex.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_tex.c4
6 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv04_context.c b/src/mesa/drivers/dri/nouveau/nv04_context.c
index cd6e876f3d6..3cc219beab4 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_context.c
@@ -53,9 +53,9 @@ nv04_context_engine(struct gl_context *ctx)
struct nouveau_pushbuf *push = context_push(ctx);
struct nouveau_object *fahrenheit;
- if ((ctx->Texture.Unit[0]._ReallyEnabled &&
+ if ((ctx->Texture.Unit[0]._Current &&
texunit_needs_combiners(&ctx->Texture.Unit[0])) ||
- ctx->Texture.Unit[1]._ReallyEnabled ||
+ ctx->Texture.Unit[1]._Current ||
ctx->Stencil.Enabled ||
!(ctx->Color.ColorMask[0][RCOMP] &&
ctx->Color.ColorMask[0][GCOMP] &&
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
index c48a0b0d566..248a7d2b522 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
@@ -257,7 +257,7 @@ nv04_emit_tex_env(struct gl_context *ctx, int emit)
struct combiner_state rc_a = {}, rc_c = {};
/* Compute the new combiner state. */
- if (ctx->Texture.Unit[i]._ReallyEnabled) {
+ if (ctx->Texture.Unit[i]._Current) {
INIT_COMBINER(A, ctx, &rc_a, i);
setup_combiner(&rc_a);
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
index ff60b338648..15eaa71531b 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
@@ -65,7 +65,7 @@ nv04_emit_tex_obj(struct gl_context *ctx, int emit)
struct nouveau_surface *s;
uint32_t format = 0xa0, filter = 0x1010;
- if (ctx->Texture.Unit[i]._ReallyEnabled) {
+ if (ctx->Texture.Unit[i]._Current) {
struct gl_texture_object *t = ctx->Texture.Unit[i]._Current;
struct gl_texture_image *ti = t->Image[0][t->BaseLevel];
const struct gl_sampler_object *sa = _mesa_get_samplerobj(ctx, i);
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
index aa7e703842a..c007c6c6bc2 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
@@ -304,7 +304,7 @@ nv10_get_general_combiner(struct gl_context *ctx, int i,
{
struct combiner_state rc_a, rc_c;
- if (ctx->Texture.Unit[i]._ReallyEnabled) {
+ if (ctx->Texture.Unit[i]._Current) {
INIT_COMBINER(RGB, ctx, &rc_c, i);
if (rc_c.mode == GL_DOT3_RGBA)
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
index 22c7a42ec1c..d85adfa9cf7 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
@@ -165,7 +165,7 @@ nv10_emit_tex_obj(struct gl_context *ctx, int emit)
PUSH_RESET(push, BUFCTX_TEX(i));
- if (!ctx->Texture.Unit[i]._ReallyEnabled) {
+ if (!ctx->Texture.Unit[i]._Current) {
BEGIN_NV04(push, NV10_3D(TEX_ENABLE(i)), 1);
PUSH_DATA (push, 0);
return;
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
index 69984068604..b0a4c9fb097 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
@@ -169,7 +169,7 @@ nv20_emit_tex_obj(struct gl_context *ctx, int emit)
PUSH_RESET(push, BUFCTX_TEX(i));
- if (!ctx->Texture.Unit[i]._ReallyEnabled) {
+ if (!ctx->Texture.Unit[i]._Current) {
BEGIN_NV04(push, NV20_3D(TEX_ENABLE(i)), 1);
PUSH_DATA (push, 0);
@@ -263,7 +263,7 @@ nv20_emit_tex_shader(struct gl_context *ctx, int emit)
int i;
for (i = 0; i < NV20_TEXTURE_UNITS; i++) {
- if (!ctx->Texture.Unit[i]._ReallyEnabled)
+ if (!ctx->Texture.Unit[i]._Current)
continue;
tx_shader_op |= NV20_3D_TEX_SHADER_OP_TX0_TEXTURE_2D << 5 * i;