Module: wine
Branch: refs/heads/master
Commit: e3c8e650845ca4c607bd5429d7bc7311863ff34b
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=e3c8e650845ca4c607bd542…
Author: Ivan Gyurdiev <ivg2(a)cornell.edu>
Date: Sat Apr 15 14:35:54 2006 -0400
wined3d: Use correct register number mask.
The regmask currently being used is wrong - 0x1FFF includes the high
two bits of the register type.
---
dlls/wined3d/pixelshader.c | 42 ++++++++++++++++++++----------------------
dlls/wined3d/vertexshader.c | 19 ++++++++++---------
2 files changed, 30 insertions(+), 31 deletions(-)
Diff: http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=e3c8e650845ca4c607b…
Module: wine
Branch: refs/heads/master
Commit: 3dddaae795336f4c4bf1a0fe26315f31f45cb145
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=3dddaae795336f4c4bf1a0f…
Author: Ivan Gyurdiev <ivg2(a)cornell.edu>
Date: Sat Apr 15 13:31:21 2006 -0400
wined3d: Use ARB[f|v]p1.0 for ps2/ps3/vs3.
---
dlls/wined3d/pixelshader.c | 7 +++----
dlls/wined3d/vertexshader.c | 15 +++++----------
2 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c
index ef6aa35..c7c9884 100644
--- a/dlls/wined3d/pixelshader.c
+++ b/dlls/wined3d/pixelshader.c
@@ -1019,24 +1019,23 @@ inline static VOID IWineD3DPixelShaderIm
case 13:
case 14: numTemps=12;
numConstants=8;
- strcpy(tmpLine, "!!ARBfp1.0\n");
break;
case 20: numTemps=12;
numConstants=8;
- strcpy(tmpLine, "!!ARBfp2.0\n");
FIXME("No work done yet to support ps2.0 in hw\n");
break;
case 30: numTemps=32;
numConstants=8;
- strcpy(tmpLine, "!!ARBfp3.0\n");
FIXME("No work done yet to support ps3.0 in hw\n");
break;
default:
numTemps=12;
numConstants=8;
- strcpy(tmpLine, "!!ARBfp1.0\n");
FIXME("Unrecognized pixel shader version!\n");
}
+
+ /* FIXME: if jumps are used, use GLSL, else use ARB_fragment_program */
+ strcpy(tmpLine, "!!ARBfp1.0\n");
addline(&lineNum, pgmStr, &pgmLength, tmpLine);
/* TODO: find out how many registers are really needed */
diff --git a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c
index 0a8f97f..0912077 100644
--- a/dlls/wined3d/vertexshader.c
+++ b/dlls/wined3d/vertexshader.c
@@ -1411,38 +1411,33 @@ inline static VOID IWineD3DVertexShaderI
case 10:
case 11: numTemps=12;
numConstants=96;/* min(GL_LIMITS(constants),96) */
- strcpy(tmpLine, "!!ARBvp1.0\n");
- TRACE("GL HW (%u) : %s", pgmLength, tmpLine); /* Don't add \n to this line as already in tmpLine */
break;
/* FIXME: if there are no calls or loops then use ARBvp1 otherwise use GLSL instead
TODO: see if there are any operations in vs2/3 that aren't supported by ARBvp
TODO: only map the maximum possible number of constants supported by openGL and not the maximum required by d3d (even better only map the used constants)*/
case 20: numTemps=12; /* min(GL_LIMITS(temps),12) */
numConstants=96; /* min(GL_LIMITS(constants),256) */
- strcpy(tmpLine, "!!ARBvp1.0\n");
FIXME("No work done yet to support vs2.0 in hw\n");
- TRACE("GL HW (%u) : %s", pgmLength, tmpLine); /* Don't add \n to this line as already in tmpLine */
break;
case 21: numTemps=12; /* min(GL_LIMITS(temps),12) */
numConstants=96; /* min(GL_LIMITS(constants),256) */
- strcpy(tmpLine, "!!ARBvp1.0\n");
FIXME("No work done yet to support vs2.1 in hw\n");
- TRACE("GL HW (%u) : %s", pgmLength, tmpLine); /* Don't add \n to this line as already in tmpLine */
break;
case 30: numTemps=32; /* min(GL_LIMITS(temps),32) */
numConstants=96;/* min(GL_LIMITS(constants),256) */
- strcpy(tmpLine, "!!ARBvp3.0\n");
FIXME("No work done yet to support vs3.0 in hw\n");
- TRACE("GL HW (%u) : %s", pgmLength, tmpLine); /* Don't add \n to this line as already in tmpLine */
break;
default:
numTemps=12;/* min(GL_LIMITS(temps),12) */
numConstants=96;/* min(GL_LIMITS(constants),96) */
- strcpy(tmpLine, "!!ARBvp1.0\n");
FIXME("Unrecognized vertex shader version %d!\n", version);
}
- PNSTRCAT(pgmStr, tmpLine);
+
+ /* FIXME: if jumps are used, use GLSL, else use ARB_vertex_program */
+ strcpy(tmpLine, "!!ARBvp1.0\n");
+ TRACE("GL HW (%u) : %s", pgmLength, tmpLine); /* Don't add \n to this line as already in tmpLine */
+ PNSTRCAT(pgmStr, tmpLine);
++lineNum;
/* This should be a bitmap so that only temp registers that are used are declared. */