From af17d89966bbf171ee5467a2cb090777802a9434 Mon Sep 17 00:00:00 2001 From: Viktor Novotný Date: Tue, 16 Nov 2010 23:22:33 +0100 Subject: dri/nouveau: Clean up magic numbers in get_rt_format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Viktor Novotný Signed-off-by: Francisco Jerez --- src/mesa/drivers/dri/nouveau/nv04_state_fb.c | 6 +++--- src/mesa/drivers/dri/nouveau/nv10_state_fb.c | 10 +++++----- src/mesa/drivers/dri/nouveau/nv20_state_fb.c | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/mesa/drivers/dri/nouveau') diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c index 730f91f10f6..854571d07e0 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c +++ b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c @@ -36,11 +36,11 @@ get_rt_format(gl_format format) { switch (format) { case MESA_FORMAT_XRGB8888: - return 0x05; + return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X8R8G8B8_X8R8G8B8; case MESA_FORMAT_ARGB8888: - return 0x08; + return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_A8R8G8B8; case MESA_FORMAT_RGB565: - return 0x03; + return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_R5G6B5; default: assert(0); } diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c index 056054e964c..05055474218 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c @@ -37,15 +37,15 @@ get_rt_format(gl_format format) { switch (format) { case MESA_FORMAT_XRGB8888: - return 0x05; + return NV10_3D_RT_FORMAT_COLOR_X8R8G8B8; case MESA_FORMAT_ARGB8888: - return 0x08; + return NV10_3D_RT_FORMAT_COLOR_A8R8G8B8; case MESA_FORMAT_RGB565: - return 0x03; + return NV10_3D_RT_FORMAT_COLOR_R5G6B5; case MESA_FORMAT_Z16: - return 0x10; + return NV10_3D_RT_FORMAT_DEPTH_Z16; case MESA_FORMAT_Z24_S8: - return 0x0; + return NV10_3D_RT_FORMAT_DEPTH_Z24S8; default: assert(0); } diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c index 8cabb5546fb..cbde74e4fc6 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c @@ -37,15 +37,15 @@ get_rt_format(gl_format format) { switch (format) { case MESA_FORMAT_XRGB8888: - return 0x05; + return NV20_3D_RT_FORMAT_COLOR_X8R8G8B8; case MESA_FORMAT_ARGB8888: - return 0x08; + return NV20_3D_RT_FORMAT_COLOR_A8R8G8B8; case MESA_FORMAT_RGB565: - return 0x03; + return NV20_3D_RT_FORMAT_COLOR_R5G6B5; case MESA_FORMAT_Z16: - return 0x10; + return NV20_3D_RT_FORMAT_DEPTH_Z16; case MESA_FORMAT_Z24_S8: - return 0x20; + return NV20_3D_RT_FORMAT_DEPTH_Z24S8; default: assert(0); } -- cgit v1.2.3