wined3d: Implement D3DTOP_BUMPENVMAPLUMINANCE.
This commit is contained in:
parent
e8b9f167d6
commit
6c12b81552
|
@ -7661,6 +7661,9 @@ static void fixed_function_bumpmap_test(IDirect3DDevice9 *device)
|
|||
DWORD color;
|
||||
int i;
|
||||
D3DCAPS9 caps;
|
||||
BOOL L6V5U5_supported = FALSE;
|
||||
IDirect3DTexture9 *tex1, *tex2;
|
||||
D3DLOCKED_RECT locked_rect;
|
||||
|
||||
static const float quad[][7] = {
|
||||
{-128.0f/640.0f, -128.0f/480.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f},
|
||||
|
@ -7678,6 +7681,7 @@ static void fixed_function_bumpmap_test(IDirect3DDevice9 *device)
|
|||
|
||||
/* use asymmetric matrix to test loading */
|
||||
float bumpenvmat[4] = {0.0,0.5,-0.5,0.0};
|
||||
float scale, offset;
|
||||
|
||||
IDirect3DVertexDeclaration9 *vertex_declaration = NULL;
|
||||
IDirect3DTexture9 *texture = NULL;
|
||||
|
@ -7696,6 +7700,9 @@ static void fixed_function_bumpmap_test(IDirect3DDevice9 *device)
|
|||
IDirect3D9 *d3d9;
|
||||
|
||||
IDirect3DDevice9_GetDirect3D(device, &d3d9);
|
||||
hr = IDirect3D9_CheckDeviceFormat(d3d9, 0, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, 0,
|
||||
D3DRTYPE_TEXTURE, D3DFMT_L6V5U5);
|
||||
L6V5U5_supported = SUCCEEDED(hr);
|
||||
hr = IDirect3D9_CheckDeviceFormat(d3d9, 0, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, 0,
|
||||
D3DRTYPE_TEXTURE, D3DFMT_V8U8);
|
||||
IDirect3D9_Release(d3d9);
|
||||
|
@ -7781,10 +7788,6 @@ static void fixed_function_bumpmap_test(IDirect3DDevice9 *device)
|
|||
color = getPixelColor(device, 320-32, 240-32);
|
||||
ok(color_match(color, 0x00000000, 4), "bumpmap failed: Got color 0x%08x, expected 0x00000000.\n", color);
|
||||
|
||||
hr = IDirect3DDevice9_SetVertexDeclaration(device, NULL);
|
||||
ok(SUCCEEDED(hr), "SetVertexDeclaration failed (%08x)\n", hr);
|
||||
IDirect3DVertexDeclaration9_Release(vertex_declaration);
|
||||
|
||||
for(i = 0; i < 2; i++) {
|
||||
hr = IDirect3DDevice9_GetTexture(device, i, (IDirect3DBaseTexture9 **) &texture);
|
||||
ok(SUCCEEDED(hr), "IDirect3DDevice9_GetTexture failed (0x%08x)\n", hr);
|
||||
|
@ -7794,11 +7797,88 @@ static void fixed_function_bumpmap_test(IDirect3DDevice9 *device)
|
|||
IDirect3DTexture9_Release(texture); /* To destroy it */
|
||||
}
|
||||
|
||||
if(!(caps.TextureOpCaps & D3DTEXOPCAPS_BUMPENVMAPLUMINANCE)) {
|
||||
skip("D3DTOP_BUMPENVMAPLUMINANCE not supported, skipping\n");
|
||||
goto cleanup;
|
||||
}
|
||||
if(L6V5U5_supported == FALSE) {
|
||||
skip("L6V5U5_supported not supported, skipping D3DTOP_BUMPENVMAPLUMINANCE test\n");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00000000, 0.0, 0x8);
|
||||
ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr);
|
||||
/* This test only tests the luminance part. The bumpmapping part was already tested above and
|
||||
* would only make this test more complicated
|
||||
*/
|
||||
hr = IDirect3DDevice9_CreateTexture(device, 1, 1, 1, 0, D3DFMT_L6V5U5, D3DPOOL_MANAGED, &tex1, NULL);
|
||||
ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed, hr=%08x\n", hr);
|
||||
hr = IDirect3DDevice9_CreateTexture(device, 1, 1, 1, 0, D3DFMT_X8R8G8B8, D3DPOOL_MANAGED, &tex2, NULL);
|
||||
ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed, hr=%08x\n", hr);
|
||||
|
||||
memset(&locked_rect, 0, sizeof(locked_rect));
|
||||
hr = IDirect3DTexture9_LockRect(tex1, 0, &locked_rect, NULL, 0);
|
||||
ok(SUCCEEDED(hr), "LockRect failed with 0x%08x\n", hr);
|
||||
*((DWORD *)locked_rect.pBits) = 0x4000; /* L = 0.25, V = 0.0, U = 0.0 */
|
||||
hr = IDirect3DTexture9_UnlockRect(tex1, 0);
|
||||
ok(SUCCEEDED(hr), "UnlockRect failed with 0x%08x\n", hr);
|
||||
|
||||
memset(&locked_rect, 0, sizeof(locked_rect));
|
||||
hr = IDirect3DTexture9_LockRect(tex2, 0, &locked_rect, NULL, 0);
|
||||
ok(SUCCEEDED(hr), "LockRect failed with 0x%08x\n", hr);
|
||||
*((DWORD *)locked_rect.pBits) = 0x00ff80c0;
|
||||
hr = IDirect3DTexture9_UnlockRect(tex2, 0);
|
||||
ok(SUCCEEDED(hr), "UnlockRect failed with 0x%08x\n", hr);
|
||||
|
||||
hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) tex1);
|
||||
ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (%08x)\n", hr);
|
||||
hr = IDirect3DDevice9_SetTexture(device, 1, (IDirect3DBaseTexture9 *) tex2);
|
||||
ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (%08x)\n", hr);
|
||||
|
||||
hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_BUMPENVMAPLUMINANCE);
|
||||
ok(SUCCEEDED(hr), "SetTextureStageState failed (%08x)\n", hr);
|
||||
scale = 2.0;
|
||||
hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_BUMPENVLSCALE, *((DWORD *)&scale));
|
||||
ok(SUCCEEDED(hr), "SetTextureStageState failed (%08x)\n", hr);
|
||||
offset = 0.1;
|
||||
hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_BUMPENVLOFFSET, *((DWORD *)&offset));
|
||||
ok(SUCCEEDED(hr), "SetTextureStageState failed (%08x)\n", hr);
|
||||
|
||||
hr = IDirect3DDevice9_BeginScene(device);
|
||||
ok(SUCCEEDED(hr), "BeginScene failed (0x%08x)\n", hr);
|
||||
if(SUCCEEDED(hr)) {
|
||||
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, &quad[0], sizeof(quad[0]));
|
||||
ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (0x%08x)\n", hr);
|
||||
hr = IDirect3DDevice9_EndScene(device);
|
||||
ok(SUCCEEDED(hr), "EndScene failed (0x%08x)\n", hr);
|
||||
}
|
||||
|
||||
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
|
||||
ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr);
|
||||
color = getPixelColor(device, 320, 240);
|
||||
/* red: 1.0 * (0.25 * 2.0 + 0.1) = 1.0 * 0.6 = 0.6 = 0x99
|
||||
* green: 0.5 * (0.25 * 2.0 + 0.1) = 0.5 * 0.6 = 0.3 = 0x4c
|
||||
* green: 0.75 * (0.25 * 2.0 + 0.1) = 0.75 * 0.6 = 0.45 = 0x72
|
||||
*/
|
||||
ok(color_match(color, 0x00994c72, 2), "bumpmap failed: Got color 0x%08x, expected 0x00ffffff.\n", color);
|
||||
|
||||
hr = IDirect3DDevice9_SetTexture(device, 0, NULL);
|
||||
ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (%08x)\n", hr);
|
||||
hr = IDirect3DDevice9_SetTexture(device, 1, NULL);
|
||||
ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (%08x)\n", hr);
|
||||
|
||||
IDirect3DTexture9_Release(tex1);
|
||||
IDirect3DTexture9_Release(tex2);
|
||||
|
||||
cleanup:
|
||||
hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
ok(SUCCEEDED(hr), "SetTextureStageState failed (%08x)\n", hr);
|
||||
hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_MODULATE);
|
||||
ok(SUCCEEDED(hr), "SetTextureStageState failed (%08x)\n", hr);
|
||||
|
||||
hr = IDirect3DDevice9_SetVertexDeclaration(device, NULL);
|
||||
ok(SUCCEEDED(hr), "SetVertexDeclaration failed (%08x)\n", hr);
|
||||
IDirect3DVertexDeclaration9_Release(vertex_declaration);
|
||||
}
|
||||
|
||||
static void stencil_cull_test(IDirect3DDevice9 *device) {
|
||||
|
|
|
@ -2220,9 +2220,10 @@ const shader_backend_t arb_program_shader_backend = {
|
|||
};
|
||||
|
||||
/* ARB_fragment_program fixed function pipeline replacement definitions */
|
||||
#define ARB_FFP_CONST_TFACTOR 0
|
||||
#define ARB_FFP_CONST_CONSTANT(i) ((ARB_FFP_CONST_TFACTOR) + 1 + i)
|
||||
#define ARB_FFP_CONST_BUMPMAT(i) ((ARB_FFP_CONST_CONSTANT(7)) + 1 + i)
|
||||
#define ARB_FFP_CONST_TFACTOR 0
|
||||
#define ARB_FFP_CONST_CONSTANT(i) ((ARB_FFP_CONST_TFACTOR) + 1 + i)
|
||||
#define ARB_FFP_CONST_BUMPMAT(i) ((ARB_FFP_CONST_CONSTANT(7)) + 1 + i)
|
||||
#define ARB_FFP_CONST_LUMINANCE(i) ((ARB_FFP_CONST_BUMPMAT(7)) + 1 + i)
|
||||
|
||||
struct arbfp_ffp_desc
|
||||
{
|
||||
|
@ -2307,10 +2308,10 @@ static void arbfp_get_caps(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info, str
|
|||
WINED3DTEXOPCAPS_DOTPRODUCT3 |
|
||||
WINED3DTEXOPCAPS_MULTIPLYADD |
|
||||
WINED3DTEXOPCAPS_LERP |
|
||||
WINED3DTEXOPCAPS_BUMPENVMAP;
|
||||
WINED3DTEXOPCAPS_BUMPENVMAP |
|
||||
WINED3DTEXOPCAPS_BUMPENVMAPLUMINANCE;
|
||||
|
||||
/* TODO: Implement WINED3DTEXOPCAPS_BUMPENVMAPLUMINANCE
|
||||
and WINED3DTEXOPCAPS_PREMODULATE */
|
||||
/* TODO: Implement WINED3DTEXOPCAPS_PREMODULATE */
|
||||
|
||||
caps->MaxTextureBlendStages = 8;
|
||||
caps->MaxSimultaneousTextures = min(GL_LIMITS(fragment_samplers), 8);
|
||||
|
@ -2371,6 +2372,39 @@ static void set_bumpmat_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, W
|
|||
}
|
||||
}
|
||||
|
||||
static void tex_bumpenvlum_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
|
||||
DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE;
|
||||
IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
|
||||
float param[4];
|
||||
|
||||
if(use_ps(device)) {
|
||||
if(stage != 0 &&
|
||||
((IWineD3DPixelShaderImpl *) stateblock->pixelShader)->baseShader.reg_maps.luminanceparams[stage]) {
|
||||
/* The pixel shader has to know the luminance offset. Do a constants update if it
|
||||
* isn't scheduled anyway
|
||||
*/
|
||||
if(!isStateDirty(context, STATE_PIXELSHADERCONSTANT)) {
|
||||
device->StateTable[STATE_PIXELSHADERCONSTANT].apply(STATE_PIXELSHADERCONSTANT, stateblock, context);
|
||||
}
|
||||
}
|
||||
/* Exit now, don't set the bumpmat below, otherwise we may overwrite pixel shader constants */
|
||||
return;
|
||||
}
|
||||
|
||||
param[0] = *((float *) &stateblock->textureState[stage][WINED3DTSS_BUMPENVLSCALE]);
|
||||
param[1] = *((float *) &stateblock->textureState[stage][WINED3DTSS_BUMPENVLOFFSET]);
|
||||
param[2] = 0.0;
|
||||
param[3] = 0.0;
|
||||
|
||||
GL_EXTCALL(glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, ARB_FFP_CONST_LUMINANCE(stage), param));
|
||||
checkGLcall("glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, ARB_FFP_CONST_LUMINANCE(stage), param)");
|
||||
|
||||
if(device->shader_backend == &arb_program_shader_backend) {
|
||||
device->activeContext->pshader_const_dirty[ARB_FFP_CONST_LUMINANCE(stage)] = 1;
|
||||
device->highest_dirty_ps_const = max(device->highest_dirty_ps_const, ARB_FFP_CONST_LUMINANCE(stage) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
static const char *get_argreg(SHADER_BUFFER *buffer, DWORD argnum, unsigned int stage, DWORD arg) {
|
||||
const char *ret;
|
||||
|
||||
|
@ -2578,6 +2612,7 @@ static GLuint gen_arbfp_ffp_shader(struct ffp_settings *settings, IWineD3DStateB
|
|||
SHADER_BUFFER buffer;
|
||||
BOOL tex_read[MAX_TEXTURES] = {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE};
|
||||
BOOL bump_used[MAX_TEXTURES] = {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE};
|
||||
BOOL luminance_used[MAX_TEXTURES] = {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE};
|
||||
const char *textype;
|
||||
const char *instr, *sat;
|
||||
char colorcor_dst[8];
|
||||
|
@ -2604,6 +2639,7 @@ static GLuint gen_arbfp_ffp_shader(struct ffp_settings *settings, IWineD3DStateB
|
|||
if(settings->op[stage].cop == WINED3DTOP_BUMPENVMAPLUMINANCE) {
|
||||
bump_used[stage] = TRUE;
|
||||
tex_read[stage] = TRUE;
|
||||
luminance_used[stage] = TRUE;
|
||||
}
|
||||
|
||||
if(arg0 == WINED3DTA_TFACTOR || arg1 == WINED3DTA_TFACTOR || arg2 == WINED3DTA_TFACTOR) {
|
||||
|
@ -2658,6 +2694,8 @@ static GLuint gen_arbfp_ffp_shader(struct ffp_settings *settings, IWineD3DStateB
|
|||
shader_addline(&buffer, "TEMP tex%u;\n", stage);
|
||||
if(!bump_used[stage]) continue;
|
||||
shader_addline(&buffer, "PARAM bumpmat%u = program.env[%u];\n", stage, ARB_FFP_CONST_BUMPMAT(stage));
|
||||
if(!luminance_used[stage]) continue;
|
||||
shader_addline(&buffer, "PARAM luminance%u = program.env[%u];\n", stage, ARB_FFP_CONST_LUMINANCE(stage));
|
||||
}
|
||||
if(tfactor_used) {
|
||||
shader_addline(&buffer, "PARAM tfactor = program.env[%u];\n", ARB_FFP_CONST_TFACTOR);
|
||||
|
@ -2715,6 +2753,11 @@ static GLuint gen_arbfp_ffp_shader(struct ffp_settings *settings, IWineD3DStateB
|
|||
shader_addline(&buffer, "ADD ret, ret, fragment.texcoord[%u];\n", stage);
|
||||
shader_addline(&buffer, "%s%s tex%u, ret, texture[%u], %s;\n",
|
||||
instr, sat, stage, stage, textype);
|
||||
if(settings->op[stage - 1].cop == WINED3DTOP_BUMPENVMAPLUMINANCE) {
|
||||
shader_addline(&buffer, "MAD ret.r, tex%u.b, luminance%u.r, luminance%u.g;\n",
|
||||
stage - 1, stage - 1, stage - 1);
|
||||
shader_addline(&buffer, "MUL tex%u, tex%u, ret.r;\n", stage, stage);
|
||||
}
|
||||
} else {
|
||||
shader_addline(&buffer, "%s%s tex%u, fragment.texcoord[%u], texture[%u], %s;\n",
|
||||
instr, sat, stage, stage, stage, textype);
|
||||
|
@ -2896,6 +2939,8 @@ static const struct StateEntryTemplate arbfp_fragmentstate_template[] = {
|
|||
{STATE_TEXTURESTAGE(0, WINED3DTSS_BUMPENVMAT01), { STATE_TEXTURESTAGE(0, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(0, WINED3DTSS_BUMPENVMAT10), { STATE_TEXTURESTAGE(0, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(0, WINED3DTSS_BUMPENVMAT11), { STATE_TEXTURESTAGE(0, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(0, WINED3DTSS_BUMPENVLSCALE), { STATE_TEXTURESTAGE(0, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(0, WINED3DTSS_BUMPENVLOFFSET), { STATE_TEXTURESTAGE(0, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(1, WINED3DTSS_COLOROP), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(1, WINED3DTSS_COLORARG1), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(1, WINED3DTSS_COLORARG2), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
|
@ -2909,6 +2954,8 @@ static const struct StateEntryTemplate arbfp_fragmentstate_template[] = {
|
|||
{STATE_TEXTURESTAGE(1, WINED3DTSS_BUMPENVMAT01), { STATE_TEXTURESTAGE(1, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(1, WINED3DTSS_BUMPENVMAT10), { STATE_TEXTURESTAGE(1, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(1, WINED3DTSS_BUMPENVMAT11), { STATE_TEXTURESTAGE(1, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(1, WINED3DTSS_BUMPENVLSCALE), { STATE_TEXTURESTAGE(1, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(1, WINED3DTSS_BUMPENVLOFFSET), { STATE_TEXTURESTAGE(1, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(2, WINED3DTSS_COLOROP), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(2, WINED3DTSS_COLORARG1), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(2, WINED3DTSS_COLORARG2), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
|
@ -2922,6 +2969,8 @@ static const struct StateEntryTemplate arbfp_fragmentstate_template[] = {
|
|||
{STATE_TEXTURESTAGE(2, WINED3DTSS_BUMPENVMAT01), { STATE_TEXTURESTAGE(2, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(2, WINED3DTSS_BUMPENVMAT10), { STATE_TEXTURESTAGE(2, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(2, WINED3DTSS_BUMPENVMAT11), { STATE_TEXTURESTAGE(2, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(2, WINED3DTSS_BUMPENVLSCALE), { STATE_TEXTURESTAGE(2, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(2, WINED3DTSS_BUMPENVLOFFSET), { STATE_TEXTURESTAGE(2, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(3, WINED3DTSS_COLOROP), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(3, WINED3DTSS_COLORARG1), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(3, WINED3DTSS_COLORARG2), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
|
@ -2935,6 +2984,8 @@ static const struct StateEntryTemplate arbfp_fragmentstate_template[] = {
|
|||
{STATE_TEXTURESTAGE(3, WINED3DTSS_BUMPENVMAT01), { STATE_TEXTURESTAGE(3, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(3, WINED3DTSS_BUMPENVMAT10), { STATE_TEXTURESTAGE(3, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(3, WINED3DTSS_BUMPENVMAT11), { STATE_TEXTURESTAGE(3, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(3, WINED3DTSS_BUMPENVLSCALE), { STATE_TEXTURESTAGE(3, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(3, WINED3DTSS_BUMPENVLOFFSET), { STATE_TEXTURESTAGE(3, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(4, WINED3DTSS_COLOROP), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(4, WINED3DTSS_COLORARG1), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(4, WINED3DTSS_COLORARG2), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
|
@ -2948,6 +2999,8 @@ static const struct StateEntryTemplate arbfp_fragmentstate_template[] = {
|
|||
{STATE_TEXTURESTAGE(4, WINED3DTSS_BUMPENVMAT01), { STATE_TEXTURESTAGE(4, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(4, WINED3DTSS_BUMPENVMAT10), { STATE_TEXTURESTAGE(4, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(4, WINED3DTSS_BUMPENVMAT11), { STATE_TEXTURESTAGE(4, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(4, WINED3DTSS_BUMPENVLSCALE), { STATE_TEXTURESTAGE(4, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(4, WINED3DTSS_BUMPENVLOFFSET), { STATE_TEXTURESTAGE(4, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(5, WINED3DTSS_COLOROP), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(5, WINED3DTSS_COLORARG1), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(5, WINED3DTSS_COLORARG2), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
|
@ -2961,6 +3014,8 @@ static const struct StateEntryTemplate arbfp_fragmentstate_template[] = {
|
|||
{STATE_TEXTURESTAGE(5, WINED3DTSS_BUMPENVMAT01), { STATE_TEXTURESTAGE(5, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(5, WINED3DTSS_BUMPENVMAT10), { STATE_TEXTURESTAGE(5, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(5, WINED3DTSS_BUMPENVMAT11), { STATE_TEXTURESTAGE(5, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(5, WINED3DTSS_BUMPENVLSCALE), { STATE_TEXTURESTAGE(5, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(5, WINED3DTSS_BUMPENVLOFFSET), { STATE_TEXTURESTAGE(5, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(6, WINED3DTSS_COLOROP), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(6, WINED3DTSS_COLORARG1), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(6, WINED3DTSS_COLORARG2), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
|
@ -2974,6 +3029,8 @@ static const struct StateEntryTemplate arbfp_fragmentstate_template[] = {
|
|||
{STATE_TEXTURESTAGE(6, WINED3DTSS_BUMPENVMAT01), { STATE_TEXTURESTAGE(6, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(6, WINED3DTSS_BUMPENVMAT10), { STATE_TEXTURESTAGE(6, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(6, WINED3DTSS_BUMPENVMAT11), { STATE_TEXTURESTAGE(6, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(6, WINED3DTSS_BUMPENVLSCALE), { STATE_TEXTURESTAGE(6, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(6, WINED3DTSS_BUMPENVLOFFSET), { STATE_TEXTURESTAGE(6, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(7, WINED3DTSS_COLOROP), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(7, WINED3DTSS_COLORARG1), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(7, WINED3DTSS_COLORARG2), { STATE_PIXELSHADER, fragment_prog_arbfp }, 0 },
|
||||
|
@ -2987,6 +3044,8 @@ static const struct StateEntryTemplate arbfp_fragmentstate_template[] = {
|
|||
{STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVMAT01), { STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVMAT10), { STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVMAT11), { STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVMAT00), set_bumpmat_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLSCALE), { STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLOFFSET), { STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, 0 },
|
||||
{ STATE_SAMPLER(0), { STATE_SAMPLER(0), sampler_texdim }, 0 },
|
||||
{ STATE_SAMPLER(1), { STATE_SAMPLER(1), sampler_texdim }, 0 },
|
||||
{ STATE_SAMPLER(2), { STATE_SAMPLER(2), sampler_texdim }, 0 },
|
||||
|
|
Loading…
Reference in New Issue