mesa: initial ARB_depth_buffer_float support
Using GL_NONE as DataType of Z32_FLOAT_X24S8, not sure what I should put there. The spec says the type is n/a. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -1131,6 +1131,16 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
|
||||
return GL_DEPTH_STENCIL_EXT;
|
||||
else
|
||||
return 0;
|
||||
case GL_DEPTH_COMPONENT32F:
|
||||
if (ctx->Extensions.ARB_depth_buffer_float)
|
||||
return GL_DEPTH_COMPONENT;
|
||||
else
|
||||
return 0;
|
||||
case GL_DEPTH32F_STENCIL8:
|
||||
if (ctx->Extensions.ARB_depth_buffer_float)
|
||||
return GL_DEPTH_STENCIL;
|
||||
else
|
||||
return 0;
|
||||
case GL_RED:
|
||||
case GL_R8:
|
||||
case GL_R16:
|
||||
@@ -2266,6 +2276,15 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
|
||||
/* special cases */
|
||||
*params = GL_INDEX;
|
||||
}
|
||||
else if (format == MESA_FORMAT_Z32_FLOAT_X24S8) {
|
||||
/* depends on the attachment parameter */
|
||||
if (attachment == GL_STENCIL_ATTACHMENT) {
|
||||
*params = GL_INDEX;
|
||||
}
|
||||
else {
|
||||
*params = GL_FLOAT;
|
||||
}
|
||||
}
|
||||
else {
|
||||
*params = _mesa_get_format_datatype(format);
|
||||
}
|
||||
|
Reference in New Issue
Block a user