summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_state.c
diff options
context:
space:
mode:
authorAapo Tahkola <aet@rasterburn.org>2005-03-12 10:14:09 +0000
committerAapo Tahkola <aet@rasterburn.org>2005-03-12 10:14:09 +0000
commit203bd3e8ecf923bba3733b5ebe861c5700ffcb79 (patch)
tree2b68dba3fb7933f016a344860afd8743ebbc17d0 /src/mesa/drivers/dri/r300/r300_state.c
parent91c219d9063bf7d3a181ee0b289c68b4a68f3db6 (diff)
Unlike radeon and r200 drivers r300AllocCmdBuf allocs dwords not bytes.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_state.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index ad2cdf585a..874bd856dd 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -1607,18 +1607,30 @@ void r300GenerateSimpleVertexShader(r300ContextPtr r300)
void r300SetupVertexShader(r300ContextPtr rmesa)
{
GLcontext* ctx = rmesa->radeon.glCtx;
+ struct r300_vertex_shader_fragment unk4={
+ length: 4,
+ body: { f: {
+ /*0.0*/(rand()%100)/10.0,
+ /*0.0*/(rand()%100)/10.0,
+ /*1.0*/(rand()%100)/10.0,
+ /*0.0*/(rand()%100)/10.0
+ } }
+ };
LOCAL_VARS
- if(rmesa->current_vp != NULL){
- r300SetupVertexProgram(rmesa);
- return ;
- }
-
/* Reset state, in case we don't use something */
((drm_r300_cmd_header_t*)rmesa->hw.vpp.cmd)->vpu.count = 0;
((drm_r300_cmd_header_t*)rmesa->hw.vpi.cmd)->vpu.count = 0;
((drm_r300_cmd_header_t*)rmesa->hw.vps.cmd)->vpu.count = 0;
+ /* Not sure why this doesnt work...
+ 0x400 area might have something to do with pixel shaders as it appears right after pfs programming.
+ 0x406 is set to { 0.0, 0.0, 1.0, 0.0 } most of the time but should change with smooth points and in other rare cases. */
+ //setup_vertex_shader_fragment(rmesa, 0x406, &unk4);
+ if(rmesa->current_vp != NULL){
+ r300SetupVertexProgram(rmesa);
+ return ;
+ }
/* This needs to be replaced by vertex shader generation code */