Commit f5e24f7a authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Implement texldd.

GL_ARB_shader_texture is supported on dx9 ATI cards(and probably dx10 ones too). For Nvidia cards I included a fallback to normal texld. GL_EXT_gpu_shader4 supports similar texture*Grad GLSL functions, just with an EXT prefix instead of ARB. For dx9 NV cards we'd have to use GL_NV_fragment_program2, which supports a texldd equivalent on those cards.
parent e7537418
......@@ -570,6 +570,10 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3
{
reg_maps->usesdsy = 1;
}
else if(ins.handler_idx == WINED3DSIH_TEXLDD)
{
reg_maps->usestexldd = 1;
}
limit = ins.src_count + (ins.predicate ? 1 : 0);
for (i = 0; i < limit; ++i)
......
......@@ -91,6 +91,7 @@ static const struct {
{"GL_ARB_vertex_program", ARB_VERTEX_PROGRAM, 0 },
{"GL_ARB_vertex_shader", ARB_VERTEX_SHADER, 0 },
{"GL_ARB_shader_objects", ARB_SHADER_OBJECTS, 0 },
{"GL_ARB_shader_texture_lod", ARB_SHADER_TEXTURE_LOD, 0 },
/* EXT */
{"GL_EXT_blend_color", EXT_BLEND_COLOR, 0 },
......
......@@ -3397,6 +3397,7 @@ typedef enum _GL_SupportedExt {
ARB_VERTEX_BUFFER_OBJECT,
ARB_VERTEX_SHADER,
ARB_SHADER_OBJECTS,
ARB_SHADER_TEXTURE_LOD,
/* EXT */
EXT_BLEND_COLOR,
EXT_BLEND_MINMAX,
......
......@@ -610,7 +610,7 @@ typedef struct shader_reg_maps
WINED3DSAMPLER_TEXTURE_TYPE sampler_type[max(MAX_FRAGMENT_SAMPLERS, MAX_VERTEX_SAMPLERS)];
BOOL bumpmat[MAX_TEXTURES], luminanceparams[MAX_TEXTURES];
char usesnrm, vpos, usesdsy;
char usesnrm, vpos, usesdsy, usestexldd;
char usesrelconstF;
/* Whether or not loops are used in this shader, and nesting depth */
......
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