From 2ab737557258148d52d9b9e983e4b18560b7a460 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 1 Apr 2010 02:21:06 +0200 Subject: [PATCH] r300g: add RGBA16F colorbuffer support Disabled by default due to unresolved IP issues. --- src/gallium/drivers/r300/r300_texture.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index d4a64092c70..e0dee44b548 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -33,6 +33,9 @@ #include "r300_state_inlines.h" #include "r300_winsys.h" +/* XXX Enable float textures here. */ +/*#define ENABLE_FLOAT_TEXTURES*/ + #define TILE_WIDTH 0 #define TILE_HEIGHT 1 @@ -278,8 +281,7 @@ static uint32_t r300_translate_texformat(enum pipe_format format) } return ~0; -/* XXX Enable float textures here. */ -#if 0 +#if defined(ENABLE_FLOAT_TEXTURES) case UTIL_FORMAT_TYPE_FLOAT: switch (desc->channel[0].size) { case 16: @@ -360,12 +362,13 @@ static uint32_t r300_translate_colorformat(enum pipe_format format) /* 64-bit buffers. */ case PIPE_FORMAT_R16G16B16A16_UNORM: case PIPE_FORMAT_R16G16B16A16_SNORM: - //case PIPE_FORMAT_R16G16B16A16_FLOAT: /* not in pipe_format */ +#if defined(ENABLE_FLOAT_TEXTURES) + case PIPE_FORMAT_R16G16B16A16_FLOAT: +#endif return R300_COLOR_FORMAT_ARGB16161616; -/* XXX Enable float textures here. */ -#if 0 /* 128-bit buffers. */ +#if defined(ENABLE_FLOAT_TEXTURES) case PIPE_FORMAT_R32G32B32A32_FLOAT: return R300_COLOR_FORMAT_ARGB32323232; #endif -- 2.30.2