diff options
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs_tnl.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_card_list.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 34 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv10_state.c | 21 |
4 files changed, 49 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs_tnl.c b/src/mesa/drivers/dri/i965/brw_vs_tnl.c index 2ed80dc36e..27210d1a37 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_tnl.c +++ b/src/mesa/drivers/dri/i965/brw_vs_tnl.c @@ -1628,7 +1628,8 @@ const struct brw_tracked_state brw_tnl_vertprog = { _NEW_FOG | _NEW_HINT | _NEW_POINT | - _NEW_TEXTURE), + _NEW_TEXTURE | + _NEW_TEXTURE_MATRIX), .brw = (BRW_NEW_FRAGMENT_PROGRAM | BRW_NEW_INPUT_VARYING), .cache = 0 diff --git a/src/mesa/drivers/dri/nouveau/nouveau_card_list.h b/src/mesa/drivers/dri/nouveau/nouveau_card_list.h index c2600bc532..b1a0e7bfd1 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_card_list.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_card_list.h @@ -113,6 +113,7 @@ static nouveau_card nouveau_card_list[]={ {0x0193, "GeForce 8800 GTS", NV30_TCL_PRIMITIVE_3D|0x5000, NV_50, 0}, {0x01A0, "GeForce2 MX Integrated Graphics", NV11_TCL_PRIMITIVE_3D, NV_11, 0}, {0x01D1, "GeForce 7300 LE", NV30_TCL_PRIMITIVE_3D|0x4400, NV_44, 0}, +{0x01D3, "GeForce 7300 SE", NV30_TCL_PRIMITIVE_3D|0x4400, NV_44, 0}, {0x01D6, "GeForce Go 7200", NV30_TCL_PRIMITIVE_3D|0x4400, NV_44, 0}, {0x01D7, "Quadro NVS 110M / GeForce Go 7300", NV30_TCL_PRIMITIVE_3D|0x4400, NV_44, 0}, {0x01D8, "GeForce Go 7400", NV30_TCL_PRIMITIVE_3D|0x4400, NV_44, 0}, diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index 0805882025..3ca1560e3a 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -145,6 +145,9 @@ extern void nouveau_state_cache_init(nouveauContextPtr nmesa); #define OUT_RING_CACHE(n) OUT_RING((n)) #define OUT_RING_CACHEf(n) OUT_RINGf((n)) #define OUT_RING_CACHEp(ptr, sz) OUT_RINGp((ptr), (sz)) +#define OUT_RING_CACHE_FORCE(n) OUT_RING((n)) +#define OUT_RING_CACHE_FORCEf(n) OUT_RINGf((n)) +#define OUT_RING_CACHE_FORCEp(ptr, sz) OUT_RINGp((ptr), (sz)) #else #define BEGIN_RING_CACHE(subchannel,tag,size) do { \ nmesa->state_cache.dirty=1; \ @@ -162,17 +165,40 @@ extern void nouveau_state_cache_init(nouveauContextPtr nmesa); }while(0) #define OUT_RING_CACHEf(n) do { \ - if ((*(float*)(&nmesa->state_cache.atoms[nmesa->state_cache.current_pos].value))!=(n)){ \ + if ((*(GLfloat*)(&nmesa->state_cache.atoms[nmesa->state_cache.current_pos].value))!=(n)){ \ nmesa->state_cache.atoms[nmesa->state_cache.current_pos].dirty=1; \ nmesa->state_cache.hdirty[nmesa->state_cache.current_pos/NOUVEAU_STATE_CACHE_HIER_SIZE]=1; \ - (*(float*)(&nmesa->state_cache.atoms[nmesa->state_cache.current_pos].value))=(n);\ + (*(GLfloat*)(&nmesa->state_cache.atoms[nmesa->state_cache.current_pos].value))=(n);\ } \ nmesa->state_cache.current_pos++; \ }while(0) #define OUT_RING_CACHEp(ptr,sz) do { \ -uint32_t* p=(uint32_t*)(ptr); \ -int i; for(i=0;i<sz;i++) OUT_RING_CACHE(*(p+i)); \ + GLuint* p=(GLuint*)(ptr); \ + int i; \ + for(i=0;i<sz;i++) \ + OUT_RING_CACHE(*(p+i)); \ +}while(0) + +#define OUT_RING_CACHE_FORCE(n) do { \ + nmesa->state_cache.atoms[nmesa->state_cache.current_pos].dirty=1; \ + nmesa->state_cache.hdirty[nmesa->state_cache.current_pos/NOUVEAU_STATE_CACHE_HIER_SIZE]=1; \ + nmesa->state_cache.atoms[nmesa->state_cache.current_pos].value=(n); \ + nmesa->state_cache.current_pos++; \ +}while(0) + +#define OUT_RING_CACHE_FORCEf(n) do { \ + nmesa->state_cache.atoms[nmesa->state_cache.current_pos].dirty=1; \ + nmesa->state_cache.hdirty[nmesa->state_cache.current_pos/NOUVEAU_STATE_CACHE_HIER_SIZE]=1; \ + (*(GLfloat*)(&nmesa->state_cache.atoms[nmesa->state_cache.current_pos].value))=(n);\ + nmesa->state_cache.current_pos++; \ +}while(0) + +#define OUT_RING_CACHE_FORCEp(ptr,sz) do { \ + GLuint* p=(GLuint*)(ptr); \ + int i; \ + for(i=0;i<sz;i++) \ + OUT_RING_CACHE_FORCE(*(p+i)); \ }while(0) #endif diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index 36084f3554..8cbe72020f 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -430,11 +430,21 @@ static void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) static void nv10Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte cf[4]; switch(pname) { case GL_FOG_MODE: - //BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FOG_MODE, 1); - //OUT_RING_CACHE (params); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FOG_MODE, 1); + OUT_RING_CACHE (ctx->Fog.Mode); /* can we extract it from params ??? */ + break; + case GL_FOG_COLOR: + CLAMPED_FLOAT_TO_UBYTE(cf[0], params[0]); + CLAMPED_FLOAT_TO_UBYTE(cf[1], params[1]); + CLAMPED_FLOAT_TO_UBYTE(cf[2], params[2]); + CLAMPED_FLOAT_TO_UBYTE(cf[3], params[3]); + + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FOG_COLOR, 1); + OUT_RING_CACHE(PACK_COLOR_8888(cf[3], cf[1], cf[2], cf[0])); break; /* TODO: unsure about the rest.*/ default: @@ -585,11 +595,12 @@ static void nv10LineWidth(GLcontext *ctx, GLfloat width) static void nv10LogicOpcode(GLcontext *ctx, GLenum opcode) { + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + if (nmesa->screen->card->type < NV_11) { return; } - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP, 1); OUT_RING_CACHE(opcode); } @@ -790,8 +801,8 @@ static void nv10UpdateProjectionMatrix(GLcontext *ctx) projection[i+12] = ctx->_ModelProjectMatrix.m[i*4+3]; } - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_PROJECTION_MATRIX(0), 16); - OUT_RINGp(projection, 16); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_PROJECTION_MATRIX(0), 16); + OUT_RING_CACHE_FORCEp(projection, 16); } static void nv10UpdateModelviewMatrix(GLcontext *ctx) |