Commit 3dddaae7 authored by Ivan Gyurdiev's avatar Ivan Gyurdiev Committed by Alexandre Julliard

wined3d: Use ARB[f|v]p1.0 for ps2/ps3/vs3.

parent e3c8e650
......@@ -1019,24 +1019,23 @@ inline static VOID IWineD3DPixelShaderImpl_GenerateProgramArbHW(IWineD3DPixelSha
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 */
......
......@@ -1411,38 +1411,33 @@ inline static VOID IWineD3DVertexShaderImpl_GenerateProgramArbHW(IWineD3DVertexS
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. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment