diff options
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_driver.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_driver.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_texture.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv04_state_tex.c | 20 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv10_state_tex.c | 20 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv20_state_tex.c | 22 |
6 files changed, 34 insertions, 35 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c b/src/mesa/drivers/dri/nouveau/nouveau_driver.c index 45630be7f6e..8b6aa820434 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_driver.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c @@ -45,7 +45,7 @@ nouveau_get_string(struct gl_context *ctx, GLenum name) case GL_RENDERER: sprintf(hardware_name, "nv%02X", context_chipset(ctx)); - driGetRendererString(buffer, hardware_name, DRIVER_DATE, 0); + driGetRendererString(buffer, hardware_name, 0); return (GLubyte *)buffer; default: diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.h b/src/mesa/drivers/dri/nouveau/nouveau_driver.h index 158aec820aa..0018eec021f 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_driver.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.h @@ -48,7 +48,6 @@ #include "nouveau_surface.h" #include "nv04_pushbuf.h" -#define DRIVER_DATE "20091015" #define DRIVER_AUTHOR "Nouveau" struct nouveau_driver { diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c index 1a1e10e0b3a..36e68c99181 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c @@ -270,8 +270,8 @@ get_last_level(struct gl_texture_object *t) { struct gl_texture_image *base = t->Image[0][t->BaseLevel]; - if (t->MinFilter == GL_NEAREST || - t->MinFilter == GL_LINEAR || !base) + if (t->Sampler.MinFilter == GL_NEAREST || + t->Sampler.MinFilter == GL_LINEAR || !base) return t->BaseLevel; else return MIN2(t->BaseLevel + base->MaxLog2, t->MaxLevel); diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c index 5ed8b147559..648d6b18cf5 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c +++ b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c @@ -80,26 +80,26 @@ nv04_emit_tex_obj(struct gl_context *ctx, int emit) s = &to_nouveau_texture(t)->surfaces[t->BaseLevel]; - if (t->MinFilter != GL_NEAREST && - t->MinFilter != GL_LINEAR) { - lod_max = CLAMP(MIN2(t->MaxLod, t->_MaxLambda), + if (t->Sampler.MinFilter != GL_NEAREST && + t->Sampler.MinFilter != GL_LINEAR) { + lod_max = CLAMP(MIN2(t->Sampler.MaxLod, t->_MaxLambda), 0, 15) + 1; lod_bias = CLAMP(ctx->Texture.Unit[i].LodBias + - t->LodBias, -16, 15) * 8; + t->Sampler.LodBias, -16, 15) * 8; } - format |= nvgl_wrap_mode(t->WrapT) << 28 | - nvgl_wrap_mode(t->WrapS) << 24 | + format |= nvgl_wrap_mode(t->Sampler.WrapT) << 28 | + nvgl_wrap_mode(t->Sampler.WrapS) << 24 | ti->HeightLog2 << 20 | ti->WidthLog2 << 16 | lod_max << 12 | get_tex_format(ti); - filter |= log2i(t->MaxAnisotropy) << 31 | - nvgl_filter_mode(t->MagFilter) << 28 | - log2i(t->MaxAnisotropy) << 27 | - nvgl_filter_mode(t->MinFilter) << 24 | + filter |= log2i(t->Sampler.MaxAnisotropy) << 31 | + nvgl_filter_mode(t->Sampler.MagFilter) << 28 | + log2i(t->Sampler.MaxAnisotropy) << 27 | + nvgl_filter_mode(t->Sampler.MinFilter) << 24 | (lod_bias & 0xff) << 16; } else { diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c index fda67b15073..620a686aea0 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c @@ -173,17 +173,17 @@ nv10_emit_tex_obj(struct gl_context *ctx, int emit) return; /* Recompute the texturing registers. */ - tx_format = nvgl_wrap_mode(t->WrapT) << 28 - | nvgl_wrap_mode(t->WrapS) << 24 + tx_format = nvgl_wrap_mode(t->Sampler.WrapT) << 28 + | nvgl_wrap_mode(t->Sampler.WrapS) << 24 | ti->HeightLog2 << 20 | ti->WidthLog2 << 16 | 5 << 4 | 1 << 12; - tx_filter = nvgl_filter_mode(t->MagFilter) << 28 - | nvgl_filter_mode(t->MinFilter) << 24; + tx_filter = nvgl_filter_mode(t->Sampler.MagFilter) << 28 + | nvgl_filter_mode(t->Sampler.MinFilter) << 24; tx_enable = NV10_3D_TEX_ENABLE_ENABLE - | log2i(t->MaxAnisotropy) << 4; + | log2i(t->Sampler.MaxAnisotropy) << 4; if (t->Target == GL_TEXTURE_RECTANGLE) { BEGIN_RING(chan, celsius, NV10_3D_TEX_NPOT_PITCH(i), 1); @@ -196,11 +196,11 @@ nv10_emit_tex_obj(struct gl_context *ctx, int emit) tx_format |= get_tex_format_pot(ti); } - if (t->MinFilter != GL_NEAREST && - t->MinFilter != GL_LINEAR) { - int lod_min = t->MinLod; - int lod_max = MIN2(t->MaxLod, t->_MaxLambda); - int lod_bias = t->LodBias + if (t->Sampler.MinFilter != GL_NEAREST && + t->Sampler.MinFilter != GL_LINEAR) { + int lod_min = t->Sampler.MinLod; + int lod_max = MIN2(t->Sampler.MaxLod, t->_MaxLambda); + int lod_bias = t->Sampler.LodBias + ctx->Texture.Unit[i].LodBias; lod_max = CLAMP(lod_max, 0, 15); diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c index c362aca0fdb..eab74aed5c2 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c @@ -186,16 +186,16 @@ nv20_emit_tex_obj(struct gl_context *ctx, int emit) | NV20_3D_TEX_FORMAT_NO_BORDER | 1 << 16; - tx_wrap = nvgl_wrap_mode(t->WrapR) << 16 - | nvgl_wrap_mode(t->WrapT) << 8 - | nvgl_wrap_mode(t->WrapS) << 0; + tx_wrap = nvgl_wrap_mode(t->Sampler.WrapR) << 16 + | nvgl_wrap_mode(t->Sampler.WrapT) << 8 + | nvgl_wrap_mode(t->Sampler.WrapS) << 0; - tx_filter = nvgl_filter_mode(t->MagFilter) << 24 - | nvgl_filter_mode(t->MinFilter) << 16 + tx_filter = nvgl_filter_mode(t->Sampler.MagFilter) << 24 + | nvgl_filter_mode(t->Sampler.MinFilter) << 16 | 2 << 12; tx_enable = NV20_3D_TEX_ENABLE_ENABLE - | log2i(t->MaxAnisotropy) << 4; + | log2i(t->Sampler.MaxAnisotropy) << 4; if (t->Target == GL_TEXTURE_RECTANGLE) { BEGIN_RING(chan, kelvin, NV20_3D_TEX_NPOT_PITCH(i), 1); @@ -208,11 +208,11 @@ nv20_emit_tex_obj(struct gl_context *ctx, int emit) tx_format |= get_tex_format_pot(ti); } - if (t->MinFilter != GL_NEAREST && - t->MinFilter != GL_LINEAR) { - int lod_min = t->MinLod; - int lod_max = MIN2(t->MaxLod, t->_MaxLambda); - int lod_bias = t->LodBias + if (t->Sampler.MinFilter != GL_NEAREST && + t->Sampler.MinFilter != GL_LINEAR) { + int lod_min = t->Sampler.MinLod; + int lod_max = MIN2(t->Sampler.MaxLod, t->_MaxLambda); + int lod_bias = t->Sampler.LodBias + ctx->Texture.Unit[i].LodBias; lod_max = CLAMP(lod_max, 0, 15); |