diff options
author | Aapo Tahkola <[email protected]> | 2005-02-24 13:59:56 +0000 |
---|---|---|
committer | Aapo Tahkola <[email protected]> | 2005-02-24 13:59:56 +0000 |
commit | ac8020ea9cad98471f0cb6529982d585b3e0b03d (patch) | |
tree | 4837dc7b79fbf2655b6f9810685ece0c4aebed2b /src | |
parent | 2c6f911e10761c0946261d494bf149b19072821d (diff) |
Another nasty struct size bug found.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_context.h | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_ioctl.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_maos.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_tex.c | 2 |
5 files changed, 15 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index c7e1b8edca7..d3dbccc8ed6 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -122,11 +122,16 @@ struct r300_dma_region { int aos_reg; /* VAP register assignment */ }; +#define DUMP_DMA(rmesa) fprintf(stderr, "start=%d, end=%d, prt=%d, offset=%d, stride=%d, size=%d, format=%d, reg=%d\n",\ +rmesa->dma.current.start, rmesa->dma.current.end, rmesa->dma.current.ptr, rmesa->dma.current.aos_offset, \ +rmesa->dma.current.aos_stride, rmesa->dma.current.aos_size, rmesa->dma.current.aos_format, rmesa->dma.current.aos_reg); + struct r300_dma { /* Active dma region. Allocations for vertices and retained * regions come from here. Also used for emitting random vertices, * these may be flushed by calling flush_current(); */ + int dummy; /* move this below current to make arbvptorus work */ struct r300_dma_region current; void (*flush) (r300ContextPtr); @@ -671,10 +676,11 @@ struct r300_state { GLuint render_inputs; /* actual render inputs that R300 was configured for. They are the same as tnl->render_inputs for fixed pipeline */ +#if 0 struct { int transform_offset; /* Transform matrix offset, -1 if none */ } vap_param; /* vertex processor parameter allocation - tells where to write parameters */ - +#endif int hw_stencil; }; diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c index de21bfc81b0..45cff5b7eb9 100644 --- a/src/mesa/drivers/dri/r300/r300_ioctl.c +++ b/src/mesa/drivers/dri/r300/r300_ioctl.c @@ -376,7 +376,7 @@ void r300RefillCurrentDmaRegion(r300ContextPtr rmesa) int size = 0; drmDMAReq dma; int ret; - + if (RADEON_DEBUG & (DEBUG_IOCTL | DEBUG_DMA)) fprintf(stderr, "%s\n", __FUNCTION__); diff --git a/src/mesa/drivers/dri/r300/r300_maos.c b/src/mesa/drivers/dri/r300/r300_maos.c index ca945956b84..4fd3dc6eb7b 100644 --- a/src/mesa/drivers/dri/r300/r300_maos.c +++ b/src/mesa/drivers/dri/r300/r300_maos.c @@ -310,6 +310,7 @@ void r300EmitArrays(GLcontext * ctx, GLboolean immd) vic_1 |= R300_INPUT_CNTL_POS; } + //DUMP_DMA(rmesa); if (inputs & _TNL_BIT_NORMAL) { CONFIGURE_AOS(i_normal, AOS_FORMAT_FLOAT, @@ -321,7 +322,7 @@ void r300EmitArrays(GLcontext * ctx, GLboolean immd) } if (inputs & _TNL_BIT_COLOR0) { - int emitsize; + int emitsize=4; if (!immd) { if (VB->ColorPtr[0]->size == 4 && diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 0123c75c2ff..e20e34c199c 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1515,7 +1515,7 @@ void r300GenerateSimpleVertexShader(r300ContextPtr r300) int i; /* Allocate parameters */ - r300->state.vap_param.transform_offset=0x0; /* transform matrix */ + //r300->state.vap_param.transform_offset=0x0; /* transform matrix */ r300->state.vertex_shader.param_offset=0x0; r300->state.vertex_shader.param_count=0x4; /* 4 vector values - 4x4 matrix */ @@ -1674,6 +1674,7 @@ void r300SetupVertexProgram(r300ContextPtr rmesa) GLcontext* ctx = rmesa->radeon.glCtx; int inst_count; int param_count; + LOCAL_VARS /* Reset state, in case we don't use something */ ((drm_r300_cmd_header_t*)rmesa->hw.vpp.cmd)->vpu.count = 0; @@ -1752,7 +1753,7 @@ void r300GenerateTexturePixelShader(r300ContextPtr r300) break; default: - fprintf(stderr, "ModeRGB=%s is not implemented yet !\n", + WARN_ONCE("ModeRGB=%s is not implemented yet !\n", _mesa_lookup_enum_by_nr(r300->radeon.glCtx->Texture.Unit[i]._CurrentCombine->ModeRGB)); /* PFS_NOP */ r300->state.pixel_shader.program.alu.inst[alu_inst].inst0= @@ -1788,7 +1789,7 @@ void r300GenerateTexturePixelShader(r300ContextPtr r300) break; default: - fprintf(stderr, "ModeA=%s is not implemented yet !\n", + WARN_ONCE("ModeA=%s is not implemented yet !\n", _mesa_lookup_enum_by_nr(r300->radeon.glCtx->Texture.Unit[i]._CurrentCombine->ModeA)); /* PFS_NOP */ r300->state.pixel_shader.program.alu.inst[alu_inst].inst2= diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c index c3010d3cebc..e6c8c18011b 100644 --- a/src/mesa/drivers/dri/r300/r300_tex.c +++ b/src/mesa/drivers/dri/r300/r300_tex.c @@ -816,7 +816,7 @@ static void r300TexEnv(GLcontext * ctx, GLenum target, */ switch (pname) { case GL_TEXTURE_ENV_COLOR:{ - fprintf(stderr, "%s:%s I am broken - Fixme !\n", __FILE__, __FUNCTION__); + WARN_ONCE("I am broken - Fixme !\n"); /* GLubyte c[4]; GLuint envColor; |