summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv50
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2016-07-16 15:07:21 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2016-07-18 20:04:17 -0400
commit8e7893eb53213254997a1a3beb0575be11821f83 (patch)
treed1f351c22e27d5db3b8de297497abcaec3dbbf9b /src/gallium/drivers/nouveau/nv50
parent905d7dc4d164b7ccc287b390a5b2492da3e0fd8b (diff)
downloadexternal_mesa3d-8e7893eb53213254997a1a3beb0575be11821f83.zip
external_mesa3d-8e7893eb53213254997a1a3beb0575be11821f83.tar.gz
external_mesa3d-8e7893eb53213254997a1a3beb0575be11821f83.tar.bz2
nvc0: add support for BGRA8 images
This is useful for pbo downloads, which are now accelerated with images. BGRA8 is a moderately common format to do that in. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50')
-rw-r--r--src/gallium/drivers/nouveau/nv50/g80_defs.xml.h1
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_formats.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/g80_defs.xml.h b/src/gallium/drivers/nouveau/nv50/g80_defs.xml.h
index 5d40624..49bf860 100644
--- a/src/gallium/drivers/nouveau/nv50/g80_defs.xml.h
+++ b/src/gallium/drivers/nouveau/nv50/g80_defs.xml.h
@@ -177,6 +177,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define GK104_IMAGE_FORMAT_RG32_FLOAT 0x0000000d
#define GK104_IMAGE_FORMAT_RG32_SINT 0x0000000e
#define GK104_IMAGE_FORMAT_RG32_UINT 0x0000000f
+#define GK104_IMAGE_FORMAT_BGRA8_UNORM 0x00000011
#define GK104_IMAGE_FORMAT_RGB10_A2_UNORM 0x00000013
#define GK104_IMAGE_FORMAT_RGB10_A2_UINT 0x00000015
#define GK104_IMAGE_FORMAT_RGBA8_UNORM 0x00000018
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_formats.c b/src/gallium/drivers/nouveau/nv50/nv50_formats.c
index 34d32d1..07c4419 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_formats.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_formats.c
@@ -50,6 +50,7 @@
#define U_IB PIPE_BIND_BLENDABLE | U_IR
#define U_TD PIPE_BIND_SCANOUT | PIPE_BIND_DISPLAY_TARGET | U_TB
#define U_TZ PIPE_BIND_DEPTH_STENCIL | U_T
+#define U_ID U_TD | U_I
#if NOUVEAU_DRIVER == 0xc0
# define U_TC U_TB
# define U_IC U_IB
@@ -122,7 +123,7 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
#endif
{
- C4(A, B8G8R8A8_UNORM, BGRA8_UNORM, B, G, R, A, UNORM, A8B8G8R8, TD),
+ C4(A, B8G8R8A8_UNORM, BGRA8_UNORM, B, G, R, A, UNORM, A8B8G8R8, ID),
F3(A, B8G8R8X8_UNORM, BGRX8_UNORM, B, G, R, xx, UNORM, A8B8G8R8, TD),
C4(A, B8G8R8A8_SRGB, BGRA8_SRGB, B, G, R, A, UNORM, A8B8G8R8, TD),
F3(A, B8G8R8X8_SRGB, BGRX8_SRGB, B, G, R, xx, UNORM, A8B8G8R8, TD),