[Mesa-dev] [PATCH 01/13] i965: Allow stencil to be used for sampling and as render target
Topi Pohjolainen
topi.pohjolainen at intel.com
Fri May 9 01:28:04 PDT 2014
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/brw_surface_formats.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c
index 5907dd9..7ffa5c4 100644
--- a/src/mesa/drivers/dri/i965/brw_surface_formats.c
+++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c
@@ -221,7 +221,7 @@ const struct surface_format_info surface_formats[] = {
SF( Y, Y, x, 45, Y, Y, Y, x, x, BRW_SURFACEFORMAT_R8_UNORM)
SF( Y, Y, x, x, Y, 60, Y, x, x, BRW_SURFACEFORMAT_R8_SNORM)
SF( Y, x, x, x, Y, x, Y, x, x, BRW_SURFACEFORMAT_R8_SINT)
- SF( Y, x, x, x, Y, x, Y, x, x, BRW_SURFACEFORMAT_R8_UINT)
+ SF(60, x, x, x, 60, x, Y, x, x, BRW_SURFACEFORMAT_R8_UINT)
SF( Y, Y, x, Y, Y, Y, x, x, x, BRW_SURFACEFORMAT_A8_UNORM)
SF( Y, Y, x, x, x, x, x, x, x, BRW_SURFACEFORMAT_I8_UNORM)
SF( Y, Y, x, Y, x, x, x, x, x, BRW_SURFACEFORMAT_L8_UNORM)
@@ -594,9 +594,12 @@ brw_init_surface_formats(struct brw_context *brw)
* integer, so we don't need hardware support for blending on it. Other
* than that, GL in general requires alpha blending for render targets,
* even though we don't support it for some formats.
+ * Stencil is also supported as render targer for internal blitting and
+ * scaling purposes.
*/
if (gen >= rinfo->render_target &&
- (gen >= rinfo->alpha_blend || is_integer)) {
+ (gen >= rinfo->alpha_blend || is_integer ||
+ format == MESA_FORMAT_S_UINT8)) {
brw->render_target_format[format] = render;
brw->format_supported_as_render_target[format] = true;
}
--
1.8.3.1
More information about the mesa-dev
mailing list