r600g: Support the PIPE_FORMAT_R16_FLOAT colorformat.
authorHenri Verbeet <hverbeet@gmail.com>
Sun, 3 Jul 2011 20:29:34 +0000 (22:29 +0200)
committerHenri Verbeet <hverbeet@gmail.com>
Sun, 3 Jul 2011 21:03:07 +0000 (23:03 +0200)
NOTE: This is a candidate for the 7.11 branch.

src/gallium/drivers/r600/eg_state_inlines.h
src/gallium/drivers/r600/r600_state_inlines.h

index af2ec56983058264ef02b6cb30a540c7da48cb32..b5590116e8f816ce568440f9b2e68a2468b07bb6 100644 (file)
@@ -327,6 +327,7 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
                return V_028C70_SWAP_STD;
 
        case PIPE_FORMAT_R16_UNORM:
+       case PIPE_FORMAT_R16_FLOAT:
                return V_028C70_SWAP_STD;
 
        /* 32-bit buffers. */
@@ -430,6 +431,9 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_R16_UNORM:
                return V_028C70_COLOR_16;
 
+       case PIPE_FORMAT_R16_FLOAT:
+               return V_028C70_COLOR_16_FLOAT;
+
        /* 32-bit buffers. */
        case PIPE_FORMAT_A8B8G8R8_SRGB:
        case PIPE_FORMAT_A8B8G8R8_UNORM:
index 5418570756f7f7b73321eb0dca9f7e7f0b4fa053..eb6fb6594b2d481450c920434cd0cd6d87e7e0e8 100644 (file)
@@ -319,6 +319,7 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
                return V_0280A0_SWAP_STD;
 
        case PIPE_FORMAT_R16_UNORM:
+       case PIPE_FORMAT_R16_FLOAT:
                return V_0280A0_SWAP_STD;
 
        /* 32-bit buffers. */
@@ -423,6 +424,9 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_R16_UNORM:
                return V_0280A0_COLOR_16;
 
+       case PIPE_FORMAT_R16_FLOAT:
+               return V_0280A0_COLOR_16_FLOAT;
+
        /* 32-bit buffers. */
        case PIPE_FORMAT_A8B8G8R8_SRGB:
        case PIPE_FORMAT_A8B8G8R8_UNORM: