Re: [r300][PATCH] minor patches

2006-07-01 Thread Rune Petersen
Brian Paul wrote:
 Rune Petersen wrote:
 Hi,

 Thought I'd share some of my patches.


 Change vp max instructions:
 The current state op the vp code is capable of executing 255 
 instructions not 255*4.

 Disable unused routes (speedup):
 When trying to get fragment.position to work I found the routes were 
 only set for the used routes and disabling it gives a few fps in some 
 games. I have found no regressions...
 
 Rune, would you like CVS-write access so you can check in your own 
 changes?  You seem to be getting pretty familiar with the code.
 
Write access would be nice.
I decided to read an OpenGL book, did wonders.


Rune Petersen


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[r300][PATCH] minor patches

2006-06-29 Thread Rune Petersen

Hi,

Thought I'd share some of my patches.


Change vp max instructions:
The current state op the vp code is capable of executing 255 
instructions not 255*4.


Disable unused routes (speedup):
When trying to get fragment.position to work I found the routes were 
only set for the used routes and disabling it gives a few fps in some 
games. I have found no regressions...


Does anyone have any luck enabling fragment.position for the fragment 
program.



Rune Petersen
Index: r300_context.c
===
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_context.c,v
retrieving revision 1.55
diff -u -r1.55 r300_context.c
--- r300_context.c  29 Jun 2006 18:36:51 -  1.55
+++ r300_context.c  29 Jun 2006 20:04:20 -
@@ -308,7 +308,8 @@
_tnl_allow_vertex_fog(ctx, GL_TRUE);
 
/* currently bogus data */
-   ctx-Const.VertexProgram.MaxNativeInstructions=VSF_MAX_FRAGMENT_LENGTH;
+   ctx-Const.VertexProgram.MaxInstructions=VSF_MAX_FRAGMENT_LENGTH/4;
+   
ctx-Const.VertexProgram.MaxNativeInstructions=VSF_MAX_FRAGMENT_LENGTH/4;
ctx-Const.VertexProgram.MaxNativeAttribs=16; /* r420 */
ctx-Const.VertexProgram.MaxTemps=32;
ctx-Const.VertexProgram.MaxNativeTemps=/*VSF_MAX_FRAGMENT_TEMPS*/32;
Index: r300_state.c
===
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_state.c,v
retrieving revision 1.158
diff -u -r1.158 r300_state.c
--- r300_state.c6 Jun 2006 22:24:12 -   1.158
+++ r300_state.c29 Jun 2006 20:05:39 -
@@ -1316,8 +1316,6 @@
R300_STATECHANGE(r300, rr);

fp_reg = in_texcoords = col_interp_nr = high_rr = 0;
-   r300-hw.rr.cmd[R300_RR_ROUTE_0] = 0;
-   r300-hw.rr.cmd[R300_RR_ROUTE_1] = 0;
 
for (i=0;ictx-Const.MaxTextureUnits;i++) {
r300-hw.ri.cmd[R300_RI_INTERP_0+i] = 0
@@ -1325,10 +1323,11 @@
| (in_texcoords  R300_RS_INTERP_SRC_SHIFT)
| interp_magic[i];
 
+   r300-hw.rr.cmd[R300_RR_ROUTE_0 + fp_reg] = 0;
if (InputsRead  (FRAG_BIT_TEX0i)) {
//assert(r300-state.texture.tc_count != 0);
-   r300-hw.rr.cmd[R300_RR_ROUTE_0 + fp_reg] = 0
-   | R300_RS_ROUTE_ENABLE
+   r300-hw.rr.cmd[R300_RR_ROUTE_0 + fp_reg] |=
+ R300_RS_ROUTE_ENABLE
| i /* source INTERP */
| (fp_reg  R300_RS_ROUTE_DEST_SHIFT);
high_rr = fp_reg;
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [r300][PATCH] minor patches

2006-06-29 Thread Brian Paul
Rune Petersen wrote:
 Hi,
 
 Thought I'd share some of my patches.
 
 
 Change vp max instructions:
 The current state op the vp code is capable of executing 255 
 instructions not 255*4.
 
 Disable unused routes (speedup):
 When trying to get fragment.position to work I found the routes were 
 only set for the used routes and disabling it gives a few fps in some 
 games. I have found no regressions...

Rune, would you like CVS-write access so you can check in your own 
changes?  You seem to be getting pretty familiar with the code.

I'll check in these two if no-one has any concerns, or if nobody beats 
me to it.

-Brian

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel