mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 09:58:05 +02:00
ARB_texture_rg: Add GL_RED as a valid GL_DEPTH_TEXTURE_MODE
This commit is contained in:
parent
cc6f13def5
commit
cd5dea6401
2 changed files with 5 additions and 1 deletions
|
|
@ -351,7 +351,8 @@ set_tex_parameteri(GLcontext *ctx,
|
|||
if (ctx->Extensions.ARB_depth_texture &&
|
||||
(params[0] == GL_LUMINANCE ||
|
||||
params[0] == GL_INTENSITY ||
|
||||
params[0] == GL_ALPHA)) {
|
||||
params[0] == GL_ALPHA ||
|
||||
(ctx->Extensions.ARB_texture_rg && params[0] == GL_RED))) {
|
||||
if (texObj->DepthMode != params[0]) {
|
||||
flush(ctx, texObj);
|
||||
texObj->DepthMode = params[0];
|
||||
|
|
|
|||
|
|
@ -3051,6 +3051,9 @@ sample_depth_texture( GLcontext *ctx,
|
|||
case GL_ALPHA:
|
||||
ASSIGN_4V(texel[i], 0.0F, 0.0F, 0.0F, result);
|
||||
break;
|
||||
case GL_RED:
|
||||
ASSIGN_4V(texel[i], result, 0.0F, 0.0F, 1.0F);
|
||||
break;
|
||||
default:
|
||||
_mesa_problem(ctx, "Bad depth texture mode");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue