summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau
diff options
context:
space:
mode:
authorViktor Novotný <[email protected]>2010-11-16 23:22:33 +0100
committerFrancisco Jerez <[email protected]>2010-11-19 19:04:50 +0100
commitaf17d89966bbf171ee5467a2cb090777802a9434 (patch)
tree10766799bb004aabfdf1137ba7cfcb8641eb7890 /src/mesa/drivers/dri/nouveau
parentfab804bdfeb0b8080b7ee52d4d79f0ef0e548d1f (diff)
dri/nouveau: Clean up magic numbers in get_rt_format
Signed-off-by: Viktor Novotný <[email protected]> Signed-off-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_fb.c6
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_fb.c10
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_fb.c10
3 files changed, 13 insertions, 13 deletions
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);
}