From 822030e329c50888387303098d09d0fd3c0c2c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Wed, 5 Sep 2007 20:01:53 +0200 Subject: [PATCH] wined3d: Enable the mNxN implementation for pixel shaders. --- dlls/wined3d/arb_program_shader.c | 4 ++-- dlls/wined3d/pixelshader.c | 10 +++++----- dlls/wined3d/vertexshader.c | 10 +++++----- dlls/wined3d/wined3d_private.h | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 9f77446f8aa..20d338e4403 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -1449,8 +1449,8 @@ void pshader_hw_texm3x2depth(SHADER_OPCODE_ARG* arg) { } /** Handles transforming all WINED3DSIO_M?x? opcodes for - Vertex shaders to ARB_vertex_program codes */ -void vshader_hw_mnxn(SHADER_OPCODE_ARG* arg) { + Vertex/Pixel shaders to ARB_vertex_program codes */ +void shader_hw_mnxn(SHADER_OPCODE_ARG* arg) { int i; int nComponents = 0; diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c index 512badc2eeb..7b9a2c42ed9 100644 --- a/dlls/wined3d/pixelshader.c +++ b/dlls/wined3d/pixelshader.c @@ -182,11 +182,11 @@ CONST SHADER_OPCODE IWineD3DPixelShaderImpl_shader_ins[] = { {WINED3DSIO_SINCOS, "sincos", "SCS", 1, 2, shader_hw_sincos, shader_glsl_sincos, WINED3DPS_VERSION(3,0), -1}, {WINED3DSIO_DP2ADD, "dp2add", NULL, 1, 4, pshader_hw_dp2add, pshader_glsl_dp2add, WINED3DPS_VERSION(2,0), -1}, /* Matrix */ - {WINED3DSIO_M4x4, "m4x4", "undefined", 1, 3, NULL, shader_glsl_mnxn, 0, 0}, - {WINED3DSIO_M4x3, "m4x3", "undefined", 1, 3, NULL, shader_glsl_mnxn, 0, 0}, - {WINED3DSIO_M3x4, "m3x4", "undefined", 1, 3, NULL, shader_glsl_mnxn, 0, 0}, - {WINED3DSIO_M3x3, "m3x3", "undefined", 1, 3, NULL, shader_glsl_mnxn, 0, 0}, - {WINED3DSIO_M3x2, "m3x2", "undefined", 1, 3, NULL, shader_glsl_mnxn, 0, 0}, + {WINED3DSIO_M4x4, "m4x4", "undefined", 1, 3, shader_hw_mnxn, shader_glsl_mnxn, 0, 0}, + {WINED3DSIO_M4x3, "m4x3", "undefined", 1, 3, shader_hw_mnxn, shader_glsl_mnxn, 0, 0}, + {WINED3DSIO_M3x4, "m3x4", "undefined", 1, 3, shader_hw_mnxn, shader_glsl_mnxn, 0, 0}, + {WINED3DSIO_M3x3, "m3x3", "undefined", 1, 3, shader_hw_mnxn, shader_glsl_mnxn, 0, 0}, + {WINED3DSIO_M3x2, "m3x2", "undefined", 1, 3, shader_hw_mnxn, shader_glsl_mnxn, 0, 0}, /* Register declarations */ {WINED3DSIO_DCL, "dcl", NULL, 0, 2, NULL, NULL, 0, 0}, /* Flow control - requires GLSL or software shaders */ diff --git a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c index e4b8088c251..45065a60b69 100644 --- a/dlls/wined3d/vertexshader.c +++ b/dlls/wined3d/vertexshader.c @@ -118,11 +118,11 @@ CONST SHADER_OPCODE IWineD3DVertexShaderImpl_shader_ins[] = { {WINED3DSIO_SINCOS, "sincos", NULL, 1, 4, shader_hw_sincos, shader_glsl_sincos, WINED3DVS_VERSION(2,0), WINED3DVS_VERSION(2,1)}, {WINED3DSIO_SINCOS, "sincos", "SCS", 1, 2, shader_hw_sincos, shader_glsl_sincos, WINED3DVS_VERSION(3,0), -1}, /* Matrix */ - {WINED3DSIO_M4x4, "m4x4", "undefined", 1, 3, vshader_hw_mnxn, shader_glsl_mnxn, 0, 0}, - {WINED3DSIO_M4x3, "m4x3", "undefined", 1, 3, vshader_hw_mnxn, shader_glsl_mnxn, 0, 0}, - {WINED3DSIO_M3x4, "m3x4", "undefined", 1, 3, vshader_hw_mnxn, shader_glsl_mnxn, 0, 0}, - {WINED3DSIO_M3x3, "m3x3", "undefined", 1, 3, vshader_hw_mnxn, shader_glsl_mnxn, 0, 0}, - {WINED3DSIO_M3x2, "m3x2", "undefined", 1, 3, vshader_hw_mnxn, shader_glsl_mnxn, 0, 0}, + {WINED3DSIO_M4x4, "m4x4", "undefined", 1, 3, shader_hw_mnxn, shader_glsl_mnxn, 0, 0}, + {WINED3DSIO_M4x3, "m4x3", "undefined", 1, 3, shader_hw_mnxn, shader_glsl_mnxn, 0, 0}, + {WINED3DSIO_M3x4, "m3x4", "undefined", 1, 3, shader_hw_mnxn, shader_glsl_mnxn, 0, 0}, + {WINED3DSIO_M3x3, "m3x3", "undefined", 1, 3, shader_hw_mnxn, shader_glsl_mnxn, 0, 0}, + {WINED3DSIO_M3x2, "m3x2", "undefined", 1, 3, shader_hw_mnxn, shader_glsl_mnxn, 0, 0}, /* Declare registers */ {WINED3DSIO_DCL, "dcl", NULL, 0, 2, NULL, NULL, 0, 0}, /* Constant definitions */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index b5230c70008..9457615ed62 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1793,10 +1793,10 @@ extern void pshader_hw_texreg2rgb(SHADER_OPCODE_ARG* arg); /* ARB vertex / pixel shader common prototypes */ extern void shader_hw_nrm(SHADER_OPCODE_ARG* arg); extern void shader_hw_sincos(SHADER_OPCODE_ARG* arg); +extern void shader_hw_mnxn(SHADER_OPCODE_ARG* arg); /* ARB vertex shader prototypes */ extern void vshader_hw_map2gl(SHADER_OPCODE_ARG* arg); -extern void vshader_hw_mnxn(SHADER_OPCODE_ARG* arg); extern void vshader_hw_rsq_rcp(SHADER_OPCODE_ARG* arg); /* GLSL helper functions */