diff options
author | Ian Romanick <[email protected]> | 2012-08-10 19:16:37 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-08-14 10:40:04 -0700 |
commit | 707f0679157f83ac45127e41647b96ed924d45c9 (patch) | |
tree | 60af6ac36c3fd0333a32282f1cedfa7bb531c77a /src/mesa/swrast | |
parent | b49771970bb8d06a179da69a7eb6b0af1b379d2d (diff) |
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 <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_texfilter.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index 51c8992087a..3c2aae91356 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/s_texfilter.c @@ -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 -shadow_compare(GLenum function, GLfloat coord, GLfloat depthSample, - GLfloat ambient) +shadow_compare(GLenum function, GLfloat coord, GLfloat depthSample) { switch (function) { case GL_LEQUAL: - return (coord <= depthSample) ? 1.0F : ambient; + return (coord <= depthSample) ? 1.0F : 0.0F; case GL_GEQUAL: - return (coord >= depthSample) ? 1.0F : ambient; + return (coord >= depthSample) ? 1.0F : 0.0F; case GL_LESS: - return (coord < depthSample) ? 1.0F : ambient; + return (coord < depthSample) ? 1.0F : 0.0F; case GL_GREATER: - return (coord > depthSample) ? 1.0F : ambient; + return (coord > depthSample) ? 1.0F : 0.0F; case GL_EQUAL: - return (coord == depthSample) ? 1.0F : ambient; + return (coord == depthSample) ? 1.0F : 0.0F; case GL_NOTEQUAL: - return (coord != depthSample) ? 1.0F : ambient; + return (coord != depthSample) ? 1.0F : 0.0F; case GL_ALWAYS: return 1.0F; case GL_NEVER: - return ambient; + return 0.0F; case GL_NONE: return depthSample; default: _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, GLfloat depth00, GLfloat depth01, 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; switch (function) { @@ -3429,13 +3428,13 @@ shadow_compare4(GLenum function, GLfloat coord, case GL_ALWAYS: return 1.0F; case GL_NEVER: - return ambient; + return 0.0F; case GL_NONE: /* ordinary bilinear filtering */ return lerp_2d(wi, wj, depth00, depth10, depth01, depth11); default: _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 GLuint compare_coord = (tObj->Target == GL_TEXTURE_2D_ARRAY_EXT) ? 3 : 2; - GLfloat ambient; GLenum function; GLfloat result; @@ -3497,8 +3495,6 @@ sample_depth_texture( struct gl_context *ctx, tObj->Target == GL_TEXTURE_2D_ARRAY_EXT || tObj->Target == GL_TEXTURE_CUBE_MAP); - ambient = samp->CompareFailValue; - /* XXXX if samp->MinFilter != samp->MagFilter, we're ignoring lambda */ 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); - result = shadow_compare(function, depthRef, depthSample, ambient); + result = shadow_compare(function, depthRef, depthSample); switch (tObj->DepthMode) { case GL_LUMINANCE: @@ -3617,7 +3613,7 @@ sample_depth_texture( struct gl_context *ctx, result = shadow_compare4(function, depthRef, depth00, depth01, depth10, depth11, - ambient, wi, wj); + wi, wj); switch (tObj->DepthMode) { case GL_LUMINANCE: |