wined3d: Implement texldb.

This commit is contained in:
Stefan Dösinger 2007-08-30 22:59:14 +02:00 committed by Alexandre Julliard
parent a006d2568b
commit 8656713366
2 changed files with 12 additions and 2 deletions

View File

@ -1605,9 +1605,18 @@ void pshader_glsl_tex(SHADER_OPCODE_ARG* arg) {
} else {
glsl_src_param_t coord_param;
shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], mask, &coord_param);
if(arg->opcode_token & WINED3DSI_TEXLD_BIAS) {
glsl_src_param_t bias;
shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_3, &bias);
shader_addline(arg->buffer, "%s(Psampler%u, %s, %s)%s);\n",
sample_function.name, sampler_idx, coord_param.param_str,
bias.param_str, dst_swizzle);
} else {
shader_addline(arg->buffer, "%s(Psampler%u, %s)%s);\n",
sample_function.name, sampler_idx, coord_param.param_str, dst_swizzle);
}
}
}
void shader_glsl_texldl(SHADER_OPCODE_ARG* arg) {

View File

@ -293,6 +293,7 @@ typedef enum _WINED3DSHADER_INSTRUCTION_OPCODE_TYPE {
/* Undocumented opcode control to identify projective texture lookups in ps 2.0 and later */
#define WINED3DSI_TEXLD_PROJECT 0x00010000
#define WINED3DSI_TEXLD_BIAS 0x00020000
/** Shader version tokens, and shader end tokens **/