mesa: Kill GL_ARB_shadow_ambient with fire
No driver supports this extension, and it seems unlikely than any driver ever will. I think r300c may have supported it at one time, but that driver has already been removed. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Marek Olšák <maraeo@gmail.com>
This commit is contained in:
@@ -114,7 +114,6 @@ struct r300_fragment_program_compiler {
|
|||||||
struct rX00_fragment_program_code *code;
|
struct rX00_fragment_program_code *code;
|
||||||
/* Optional transformations and features. */
|
/* Optional transformations and features. */
|
||||||
struct r300_fragment_program_external_state state;
|
struct r300_fragment_program_external_state state;
|
||||||
unsigned enable_shadow_ambient;
|
|
||||||
/* Register corresponding to the depthbuffer. */
|
/* Register corresponding to the depthbuffer. */
|
||||||
unsigned OutputDepth;
|
unsigned OutputDepth;
|
||||||
/* Registers corresponding to the four colorbuffers. */
|
/* Registers corresponding to the four colorbuffers. */
|
||||||
|
@@ -37,17 +37,8 @@ static struct rc_src_register shadow_fail_value(struct r300_fragment_program_com
|
|||||||
{
|
{
|
||||||
struct rc_src_register reg = { 0, 0, 0, 0, 0, 0 };
|
struct rc_src_register reg = { 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
if (compiler->enable_shadow_ambient) {
|
reg.File = RC_FILE_NONE;
|
||||||
reg.File = RC_FILE_CONSTANT;
|
reg.Swizzle = combine_swizzles(RC_SWIZZLE_0000,
|
||||||
reg.Index = rc_constants_add_state(&compiler->Base.Program.Constants,
|
|
||||||
RC_STATE_SHADOW_AMBIENT, tmu);
|
|
||||||
reg.Swizzle = RC_SWIZZLE_WWWW;
|
|
||||||
} else {
|
|
||||||
reg.File = RC_FILE_NONE;
|
|
||||||
reg.Swizzle = RC_SWIZZLE_0000;
|
|
||||||
}
|
|
||||||
|
|
||||||
reg.Swizzle = combine_swizzles(reg.Swizzle,
|
|
||||||
compiler->state.unit[tmu].texture_swizzle);
|
compiler->state.unit[tmu].texture_swizzle);
|
||||||
return reg;
|
return reg;
|
||||||
}
|
}
|
||||||
|
@@ -805,10 +805,6 @@ pop_texture_group(struct gl_context *ctx, struct texture_state *texstate)
|
|||||||
_mesa_TexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT,
|
_mesa_TexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT,
|
||||||
samp->MaxAnisotropy);
|
samp->MaxAnisotropy);
|
||||||
}
|
}
|
||||||
if (ctx->Extensions.ARB_shadow_ambient) {
|
|
||||||
_mesa_TexParameterf(target, GL_TEXTURE_COMPARE_FAIL_VALUE_ARB,
|
|
||||||
samp->CompareFailValue);
|
|
||||||
}
|
|
||||||
if (ctx->Extensions.ARB_shadow) {
|
if (ctx->Extensions.ARB_shadow) {
|
||||||
_mesa_TexParameteri(target, GL_TEXTURE_COMPARE_MODE,
|
_mesa_TexParameteri(target, GL_TEXTURE_COMPARE_MODE,
|
||||||
samp->CompareMode);
|
samp->CompareMode);
|
||||||
|
@@ -120,7 +120,6 @@ static const struct extension extension_table[] = {
|
|||||||
{ "GL_ARB_shader_stencil_export", o(ARB_shader_stencil_export), GL, 2009 },
|
{ "GL_ARB_shader_stencil_export", o(ARB_shader_stencil_export), GL, 2009 },
|
||||||
{ "GL_ARB_shader_texture_lod", o(ARB_shader_texture_lod), GL, 2009 },
|
{ "GL_ARB_shader_texture_lod", o(ARB_shader_texture_lod), GL, 2009 },
|
||||||
{ "GL_ARB_shading_language_100", o(ARB_shading_language_100), GLL, 2003 },
|
{ "GL_ARB_shading_language_100", o(ARB_shading_language_100), GLL, 2003 },
|
||||||
{ "GL_ARB_shadow_ambient", o(ARB_shadow_ambient), GL, 2001 },
|
|
||||||
{ "GL_ARB_shadow", o(ARB_shadow), GLL, 2001 },
|
{ "GL_ARB_shadow", o(ARB_shadow), GLL, 2001 },
|
||||||
{ "GL_ARB_sync", o(ARB_sync), GL, 2003 },
|
{ "GL_ARB_sync", o(ARB_sync), GL, 2003 },
|
||||||
{ "GL_ARB_texture_border_clamp", o(ARB_texture_border_clamp), GLL, 2000 },
|
{ "GL_ARB_texture_border_clamp", o(ARB_texture_border_clamp), GLL, 2000 },
|
||||||
@@ -427,7 +426,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
|
|||||||
ctx->Extensions.ARB_shading_language_100 = GL_TRUE;
|
ctx->Extensions.ARB_shading_language_100 = GL_TRUE;
|
||||||
#endif
|
#endif
|
||||||
ctx->Extensions.ARB_shadow = GL_TRUE;
|
ctx->Extensions.ARB_shadow = GL_TRUE;
|
||||||
ctx->Extensions.ARB_shadow_ambient = GL_TRUE;
|
|
||||||
ctx->Extensions.ARB_texture_border_clamp = GL_TRUE;
|
ctx->Extensions.ARB_texture_border_clamp = GL_TRUE;
|
||||||
ctx->Extensions.ARB_texture_cube_map = GL_TRUE;
|
ctx->Extensions.ARB_texture_cube_map = GL_TRUE;
|
||||||
ctx->Extensions.ARB_texture_env_combine = GL_TRUE;
|
ctx->Extensions.ARB_texture_env_combine = GL_TRUE;
|
||||||
|
@@ -1250,7 +1250,6 @@ struct gl_sampler_object
|
|||||||
GLfloat MaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */
|
GLfloat MaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */
|
||||||
GLenum CompareMode; /**< GL_ARB_shadow */
|
GLenum CompareMode; /**< GL_ARB_shadow */
|
||||||
GLenum CompareFunc; /**< GL_ARB_shadow */
|
GLenum CompareFunc; /**< GL_ARB_shadow */
|
||||||
GLfloat CompareFailValue; /**< GL_ARB_shadow_ambient */
|
|
||||||
GLenum sRGBDecode; /**< GL_DECODE_EXT or GL_SKIP_DECODE_EXT */
|
GLenum sRGBDecode; /**< GL_DECODE_EXT or GL_SKIP_DECODE_EXT */
|
||||||
GLboolean CubeMapSeamless; /**< GL_AMD_seamless_cubemap_per_texture */
|
GLboolean CubeMapSeamless; /**< GL_AMD_seamless_cubemap_per_texture */
|
||||||
};
|
};
|
||||||
@@ -2972,7 +2971,6 @@ struct gl_extensions
|
|||||||
GLboolean ARB_shader_texture_lod;
|
GLboolean ARB_shader_texture_lod;
|
||||||
GLboolean ARB_shading_language_100;
|
GLboolean ARB_shading_language_100;
|
||||||
GLboolean ARB_shadow;
|
GLboolean ARB_shadow;
|
||||||
GLboolean ARB_shadow_ambient;
|
|
||||||
GLboolean ARB_sync;
|
GLboolean ARB_sync;
|
||||||
GLboolean ARB_texture_border_clamp;
|
GLboolean ARB_texture_border_clamp;
|
||||||
GLboolean ARB_texture_buffer_object;
|
GLboolean ARB_texture_buffer_object;
|
||||||
|
@@ -130,7 +130,6 @@ _mesa_init_sampler_object(struct gl_sampler_object *sampObj, GLuint name)
|
|||||||
sampObj->MaxAnisotropy = 1.0F;
|
sampObj->MaxAnisotropy = 1.0F;
|
||||||
sampObj->CompareMode = GL_NONE;
|
sampObj->CompareMode = GL_NONE;
|
||||||
sampObj->CompareFunc = GL_LEQUAL;
|
sampObj->CompareFunc = GL_LEQUAL;
|
||||||
sampObj->CompareFailValue = 0.0;
|
|
||||||
sampObj->sRGBDecode = GL_DECODE_EXT;
|
sampObj->sRGBDecode = GL_DECODE_EXT;
|
||||||
sampObj->CubeMapSeamless = GL_FALSE;
|
sampObj->CubeMapSeamless = GL_FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -144,7 +144,6 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj,
|
|||||||
obj->Sampler.MaxAnisotropy = 1.0;
|
obj->Sampler.MaxAnisotropy = 1.0;
|
||||||
obj->Sampler.CompareMode = GL_NONE; /* ARB_shadow */
|
obj->Sampler.CompareMode = GL_NONE; /* ARB_shadow */
|
||||||
obj->Sampler.CompareFunc = GL_LEQUAL; /* ARB_shadow */
|
obj->Sampler.CompareFunc = GL_LEQUAL; /* ARB_shadow */
|
||||||
obj->Sampler.CompareFailValue = 0.0F; /* ARB_shadow_ambient */
|
|
||||||
obj->DepthMode = GL_LUMINANCE;
|
obj->DepthMode = GL_LUMINANCE;
|
||||||
obj->Sampler.CubeMapSeamless = GL_FALSE;
|
obj->Sampler.CubeMapSeamless = GL_FALSE;
|
||||||
obj->Swizzle[0] = GL_RED;
|
obj->Swizzle[0] = GL_RED;
|
||||||
@@ -257,7 +256,6 @@ _mesa_copy_texture_object( struct gl_texture_object *dest,
|
|||||||
dest->Sampler.MaxAnisotropy = src->Sampler.MaxAnisotropy;
|
dest->Sampler.MaxAnisotropy = src->Sampler.MaxAnisotropy;
|
||||||
dest->Sampler.CompareMode = src->Sampler.CompareMode;
|
dest->Sampler.CompareMode = src->Sampler.CompareMode;
|
||||||
dest->Sampler.CompareFunc = src->Sampler.CompareFunc;
|
dest->Sampler.CompareFunc = src->Sampler.CompareFunc;
|
||||||
dest->Sampler.CompareFailValue = src->Sampler.CompareFailValue;
|
|
||||||
dest->Sampler.CubeMapSeamless = src->Sampler.CubeMapSeamless;
|
dest->Sampler.CubeMapSeamless = src->Sampler.CubeMapSeamless;
|
||||||
dest->DepthMode = src->DepthMode;
|
dest->DepthMode = src->DepthMode;
|
||||||
dest->Sampler.sRGBDecode = src->Sampler.sRGBDecode;
|
dest->Sampler.sRGBDecode = src->Sampler.sRGBDecode;
|
||||||
|
@@ -541,20 +541,6 @@ set_tex_parameterf(struct gl_context *ctx,
|
|||||||
}
|
}
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
|
||||||
case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
|
|
||||||
if (ctx->Extensions.ARB_shadow_ambient) {
|
|
||||||
if (texObj->Sampler.CompareFailValue != params[0]) {
|
|
||||||
flush(ctx);
|
|
||||||
texObj->Sampler.CompareFailValue = CLAMP(params[0], 0.0F, 1.0F);
|
|
||||||
return GL_TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
|
||||||
"glTexParameter(pname=GL_TEXTURE_COMPARE_FAIL_VALUE_ARB)");
|
|
||||||
}
|
|
||||||
return GL_FALSE;
|
|
||||||
|
|
||||||
case GL_TEXTURE_LOD_BIAS:
|
case GL_TEXTURE_LOD_BIAS:
|
||||||
/* NOTE: this is really part of OpenGL 1.4, not EXT_texture_lod_bias */
|
/* NOTE: this is really part of OpenGL 1.4, not EXT_texture_lod_bias */
|
||||||
if (texObj->Sampler.LodBias != params[0]) {
|
if (texObj->Sampler.LodBias != params[0]) {
|
||||||
@@ -1136,11 +1122,6 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
|
|||||||
goto invalid_pname;
|
goto invalid_pname;
|
||||||
*params = obj->Sampler.MaxAnisotropy;
|
*params = obj->Sampler.MaxAnisotropy;
|
||||||
break;
|
break;
|
||||||
case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
|
|
||||||
if (!ctx->Extensions.ARB_shadow_ambient)
|
|
||||||
goto invalid_pname;
|
|
||||||
*params = obj->Sampler.CompareFailValue;
|
|
||||||
break;
|
|
||||||
case GL_GENERATE_MIPMAP_SGIS:
|
case GL_GENERATE_MIPMAP_SGIS:
|
||||||
*params = (GLfloat) obj->GenerateMipmap;
|
*params = (GLfloat) obj->GenerateMipmap;
|
||||||
break;
|
break;
|
||||||
@@ -1282,11 +1263,6 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
|
|||||||
goto invalid_pname;
|
goto invalid_pname;
|
||||||
*params = (GLint) obj->Sampler.MaxAnisotropy;
|
*params = (GLint) obj->Sampler.MaxAnisotropy;
|
||||||
break;
|
break;
|
||||||
case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
|
|
||||||
if (!ctx->Extensions.ARB_shadow_ambient)
|
|
||||||
goto invalid_pname;
|
|
||||||
*params = (GLint) FLOAT_TO_INT(obj->Sampler.CompareFailValue);
|
|
||||||
break;
|
|
||||||
case GL_GENERATE_MIPMAP_SGIS:
|
case GL_GENERATE_MIPMAP_SGIS:
|
||||||
*params = (GLint) obj->GenerateMipmap;
|
*params = (GLint) obj->GenerateMipmap;
|
||||||
break;
|
break;
|
||||||
|
@@ -551,22 +551,6 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[],
|
|||||||
value[3] = ctx->Pixel.AlphaBias;
|
value[3] = ctx->Pixel.AlphaBias;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case STATE_SHADOW_AMBIENT:
|
|
||||||
{
|
|
||||||
const int unit = (int) state[2];
|
|
||||||
const struct gl_texture_object *texObj
|
|
||||||
= ctx->Texture.Unit[unit]._Current;
|
|
||||||
const struct gl_sampler_object *samp =
|
|
||||||
_mesa_get_samplerobj(ctx, unit);
|
|
||||||
if (texObj) {
|
|
||||||
value[0] =
|
|
||||||
value[1] =
|
|
||||||
value[2] =
|
|
||||||
value[3] = samp->CompareFailValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case STATE_FB_SIZE:
|
case STATE_FB_SIZE:
|
||||||
value[0] = (GLfloat) (ctx->DrawBuffer->Width - 1);
|
value[0] = (GLfloat) (ctx->DrawBuffer->Width - 1);
|
||||||
value[1] = (GLfloat) (ctx->DrawBuffer->Height - 1);
|
value[1] = (GLfloat) (ctx->DrawBuffer->Height - 1);
|
||||||
@@ -702,7 +686,6 @@ _mesa_program_state_flags(const gl_state_index state[STATE_LENGTH])
|
|||||||
return _NEW_MODELVIEW;
|
return _NEW_MODELVIEW;
|
||||||
|
|
||||||
case STATE_TEXRECT_SCALE:
|
case STATE_TEXRECT_SCALE:
|
||||||
case STATE_SHADOW_AMBIENT:
|
|
||||||
case STATE_ROT_MATRIX_0:
|
case STATE_ROT_MATRIX_0:
|
||||||
case STATE_ROT_MATRIX_1:
|
case STATE_ROT_MATRIX_1:
|
||||||
return _NEW_TEXTURE;
|
return _NEW_TEXTURE;
|
||||||
@@ -918,9 +901,6 @@ append_token(char *dst, gl_state_index k)
|
|||||||
case STATE_PT_BIAS:
|
case STATE_PT_BIAS:
|
||||||
append(dst, "PTbias");
|
append(dst, "PTbias");
|
||||||
break;
|
break;
|
||||||
case STATE_SHADOW_AMBIENT:
|
|
||||||
append(dst, "CompareFailValue");
|
|
||||||
break;
|
|
||||||
case STATE_FB_SIZE:
|
case STATE_FB_SIZE:
|
||||||
append(dst, "FbSize");
|
append(dst, "FbSize");
|
||||||
break;
|
break;
|
||||||
|
@@ -124,7 +124,6 @@ typedef enum gl_state_index_ {
|
|||||||
STATE_LIGHT_HALF_VECTOR, /* object vs eye space */
|
STATE_LIGHT_HALF_VECTOR, /* object vs eye space */
|
||||||
STATE_PT_SCALE, /**< Pixel transfer RGBA scale */
|
STATE_PT_SCALE, /**< Pixel transfer RGBA scale */
|
||||||
STATE_PT_BIAS, /**< Pixel transfer RGBA bias */
|
STATE_PT_BIAS, /**< Pixel transfer RGBA bias */
|
||||||
STATE_SHADOW_AMBIENT, /**< ARB_shadow_ambient fail value; token[2] is texture unit index */
|
|
||||||
STATE_FB_SIZE, /**< (width-1, height-1, 0, 0) */
|
STATE_FB_SIZE, /**< (width-1, height-1, 0, 0) */
|
||||||
STATE_FB_WPOS_Y_TRANSFORM, /**< (1, 0, -1, height) if a FBO is bound, (-1, height, 1, 0) otherwise */
|
STATE_FB_WPOS_Y_TRANSFORM, /**< (1, 0, -1, height) if a FBO is bound, (-1, height, 1, 0) otherwise */
|
||||||
STATE_ROT_MATRIX_0, /**< ATI_envmap_bumpmap, rot matrix row 0 */
|
STATE_ROT_MATRIX_0, /**< ATI_envmap_bumpmap, rot matrix row 0 */
|
||||||
|
@@ -3345,34 +3345,33 @@ sample_lambda_1d_array(struct gl_context *ctx,
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compare texcoord against depth sample. Return 1.0 or the ambient value.
|
* Compare texcoord against depth sample. Return 1.0 or 0.0 value.
|
||||||
*/
|
*/
|
||||||
static inline GLfloat
|
static inline GLfloat
|
||||||
shadow_compare(GLenum function, GLfloat coord, GLfloat depthSample,
|
shadow_compare(GLenum function, GLfloat coord, GLfloat depthSample)
|
||||||
GLfloat ambient)
|
|
||||||
{
|
{
|
||||||
switch (function) {
|
switch (function) {
|
||||||
case GL_LEQUAL:
|
case GL_LEQUAL:
|
||||||
return (coord <= depthSample) ? 1.0F : ambient;
|
return (coord <= depthSample) ? 1.0F : 0.0F;
|
||||||
case GL_GEQUAL:
|
case GL_GEQUAL:
|
||||||
return (coord >= depthSample) ? 1.0F : ambient;
|
return (coord >= depthSample) ? 1.0F : 0.0F;
|
||||||
case GL_LESS:
|
case GL_LESS:
|
||||||
return (coord < depthSample) ? 1.0F : ambient;
|
return (coord < depthSample) ? 1.0F : 0.0F;
|
||||||
case GL_GREATER:
|
case GL_GREATER:
|
||||||
return (coord > depthSample) ? 1.0F : ambient;
|
return (coord > depthSample) ? 1.0F : 0.0F;
|
||||||
case GL_EQUAL:
|
case GL_EQUAL:
|
||||||
return (coord == depthSample) ? 1.0F : ambient;
|
return (coord == depthSample) ? 1.0F : 0.0F;
|
||||||
case GL_NOTEQUAL:
|
case GL_NOTEQUAL:
|
||||||
return (coord != depthSample) ? 1.0F : ambient;
|
return (coord != depthSample) ? 1.0F : 0.0F;
|
||||||
case GL_ALWAYS:
|
case GL_ALWAYS:
|
||||||
return 1.0F;
|
return 1.0F;
|
||||||
case GL_NEVER:
|
case GL_NEVER:
|
||||||
return ambient;
|
return 0.0F;
|
||||||
case GL_NONE:
|
case GL_NONE:
|
||||||
return depthSample;
|
return depthSample;
|
||||||
default:
|
default:
|
||||||
_mesa_problem(NULL, "Bad compare func in shadow_compare");
|
_mesa_problem(NULL, "Bad compare func in shadow_compare");
|
||||||
return ambient;
|
return 0.0F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3384,9 +3383,9 @@ static inline GLfloat
|
|||||||
shadow_compare4(GLenum function, GLfloat coord,
|
shadow_compare4(GLenum function, GLfloat coord,
|
||||||
GLfloat depth00, GLfloat depth01,
|
GLfloat depth00, GLfloat depth01,
|
||||||
GLfloat depth10, GLfloat depth11,
|
GLfloat depth10, GLfloat depth11,
|
||||||
GLfloat ambient, GLfloat wi, GLfloat wj)
|
GLfloat wi, GLfloat wj)
|
||||||
{
|
{
|
||||||
const GLfloat d = (1.0F - (GLfloat) ambient) * 0.25F;
|
const GLfloat d = 0.25F;
|
||||||
GLfloat luminance = 1.0F;
|
GLfloat luminance = 1.0F;
|
||||||
|
|
||||||
switch (function) {
|
switch (function) {
|
||||||
@@ -3429,13 +3428,13 @@ shadow_compare4(GLenum function, GLfloat coord,
|
|||||||
case GL_ALWAYS:
|
case GL_ALWAYS:
|
||||||
return 1.0F;
|
return 1.0F;
|
||||||
case GL_NEVER:
|
case GL_NEVER:
|
||||||
return ambient;
|
return 0.0F;
|
||||||
case GL_NONE:
|
case GL_NONE:
|
||||||
/* ordinary bilinear filtering */
|
/* ordinary bilinear filtering */
|
||||||
return lerp_2d(wi, wj, depth00, depth10, depth01, depth11);
|
return lerp_2d(wi, wj, depth00, depth10, depth01, depth11);
|
||||||
default:
|
default:
|
||||||
_mesa_problem(NULL, "Bad compare func in sample_compare4");
|
_mesa_problem(NULL, "Bad compare func in sample_compare4");
|
||||||
return ambient;
|
return 0.0F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3483,7 +3482,6 @@ sample_depth_texture( struct gl_context *ctx,
|
|||||||
const GLint depth = img->Depth;
|
const GLint depth = img->Depth;
|
||||||
const GLuint compare_coord = (tObj->Target == GL_TEXTURE_2D_ARRAY_EXT)
|
const GLuint compare_coord = (tObj->Target == GL_TEXTURE_2D_ARRAY_EXT)
|
||||||
? 3 : 2;
|
? 3 : 2;
|
||||||
GLfloat ambient;
|
|
||||||
GLenum function;
|
GLenum function;
|
||||||
GLfloat result;
|
GLfloat result;
|
||||||
|
|
||||||
@@ -3497,8 +3495,6 @@ sample_depth_texture( struct gl_context *ctx,
|
|||||||
tObj->Target == GL_TEXTURE_2D_ARRAY_EXT ||
|
tObj->Target == GL_TEXTURE_2D_ARRAY_EXT ||
|
||||||
tObj->Target == GL_TEXTURE_CUBE_MAP);
|
tObj->Target == GL_TEXTURE_CUBE_MAP);
|
||||||
|
|
||||||
ambient = samp->CompareFailValue;
|
|
||||||
|
|
||||||
/* XXXX if samp->MinFilter != samp->MagFilter, we're ignoring lambda */
|
/* XXXX if samp->MinFilter != samp->MagFilter, we're ignoring lambda */
|
||||||
|
|
||||||
function = (samp->CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB) ?
|
function = (samp->CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB) ?
|
||||||
@@ -3522,7 +3518,7 @@ sample_depth_texture( struct gl_context *ctx,
|
|||||||
|
|
||||||
depthRef = CLAMP(texcoords[i][compare_coord], 0.0F, 1.0F);
|
depthRef = CLAMP(texcoords[i][compare_coord], 0.0F, 1.0F);
|
||||||
|
|
||||||
result = shadow_compare(function, depthRef, depthSample, ambient);
|
result = shadow_compare(function, depthRef, depthSample);
|
||||||
|
|
||||||
switch (tObj->DepthMode) {
|
switch (tObj->DepthMode) {
|
||||||
case GL_LUMINANCE:
|
case GL_LUMINANCE:
|
||||||
@@ -3617,7 +3613,7 @@ sample_depth_texture( struct gl_context *ctx,
|
|||||||
|
|
||||||
result = shadow_compare4(function, depthRef,
|
result = shadow_compare4(function, depthRef,
|
||||||
depth00, depth01, depth10, depth11,
|
depth00, depth01, depth10, depth11,
|
||||||
ambient, wi, wj);
|
wi, wj);
|
||||||
|
|
||||||
switch (tObj->DepthMode) {
|
switch (tObj->DepthMode) {
|
||||||
case GL_LUMINANCE:
|
case GL_LUMINANCE:
|
||||||
|
Reference in New Issue
Block a user