if (!drb &&
(srb = intel_get_renderbuffer(fb, BUFFER_STENCIL)) &&
!srb->mt->stencil_mt &&
- srb->Base.Format == MESA_FORMAT_S8_Z24) {
+ (srb->Base.Format == MESA_FORMAT_S8_Z24 ||
+ srb->Base.Format == MESA_FORMAT_Z32_FLOAT_X24S8)) {
drb = srb;
}
return BRW_DEPTHFORMAT_D24_UNORM_X8_UINT;
case MESA_FORMAT_S8_Z24:
return BRW_DEPTHFORMAT_D24_UNORM_S8_UINT;
+ case MESA_FORMAT_Z32_FLOAT_X24S8:
+ return BRW_DEPTHFORMAT_D32_FLOAT_S8X24_UINT;
default:
_mesa_problem(ctx, "Unexpected depth format %s\n",
_mesa_get_format_name(drb->Base.Format));
brw->format_supported_as_render_target[MESA_FORMAT_X8_Z24] = true;
brw->format_supported_as_render_target[MESA_FORMAT_S8] = true;
brw->format_supported_as_render_target[MESA_FORMAT_Z16] = true;
+ brw->format_supported_as_render_target[MESA_FORMAT_Z32_FLOAT] = true;
+ brw->format_supported_as_render_target[MESA_FORMAT_Z32_FLOAT_X24S8] = true;
/* We remap depth formats to a supported texturing format in
* translate_tex_format().
*/
ctx->TextureFormatSupported[MESA_FORMAT_S8_Z24] = true;
ctx->TextureFormatSupported[MESA_FORMAT_X8_Z24] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_X24S8] = true;
}
bool
case MESA_FORMAT_X8_Z24:
return BRW_SURFACEFORMAT_I24X8_UNORM;
+ case MESA_FORMAT_Z32_FLOAT:
+ return BRW_SURFACEFORMAT_I32_FLOAT;
+
+ case MESA_FORMAT_Z32_FLOAT_X24S8:
+ return BRW_SURFACEFORMAT_R32G32_FLOAT;
+
case MESA_FORMAT_SARGB8:
case MESA_FORMAT_SLA8:
case MESA_FORMAT_SL8:
if (intel->gen >= 4) {
ctx->Extensions.ARB_color_buffer_float = true;
+ if (override_version >= 30)
+ ctx->Extensions.ARB_depth_buffer_float = true;
ctx->Extensions.ARB_depth_clamp = true;
ctx->Extensions.ARB_fragment_coord_conventions = true;
ctx->Extensions.ARB_fragment_program_shadow = true;
case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32:
return GL_FLOAT;
+ /* The core depthstencil wrappers demand this. */
+ case MESA_FORMAT_Z32_FLOAT_X24S8:
+ return GL_FLOAT_32_UNSIGNED_INT_24_8_REV;
+
default:
/* Unsupported format. We may hit this when people ask for FBO-incomplete
* formats.