summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_helper.c
diff options
context:
space:
mode:
authorJerome Glisse <[email protected]>2010-07-23 20:55:48 -0400
committerJerome Glisse <[email protected]>2010-07-23 20:57:21 -0400
commit33241134e6e3d5bf19141eceff90fd854b23386a (patch)
tree123f5773d69e44c29ca08e8f0d89b589f0c24674 /src/gallium/drivers/r600/r600_helper.c
parentac11bdd8315a05d227a81caad86ed7e9980fb980 (diff)
r600g: first pass at texture support
This add texture support to the assembler, generated code is wrong (tested against working dump). Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_helper.c')
-rw-r--r--src/gallium/drivers/r600/r600_helper.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/r600_helper.c b/src/gallium/drivers/r600/r600_helper.c
index e3175b627aa..7241ab1c175 100644
--- a/src/gallium/drivers/r600/r600_helper.c
+++ b/src/gallium/drivers/r600/r600_helper.c
@@ -27,6 +27,7 @@
#include <errno.h>
#include <util/u_inlines.h>
#include "r600_screen.h"
+#include "r600_context.h"
#include "r600d.h"
int r600_conv_pipe_format(unsigned pformat, unsigned *format)
@@ -49,6 +50,12 @@ int r600_conv_pipe_format(unsigned pformat, unsigned *format)
case PIPE_FORMAT_R8G8B8A8_SSCALED:
*format = V_0280A0_COLOR_8_8_8_8;
return 0;
+ case PIPE_FORMAT_R32_FLOAT:
+ *format = V_0280A0_COLOR_32_FLOAT;
+ return 0;
+ case PIPE_FORMAT_R32G32_FLOAT:
+ *format = V_0280A0_COLOR_32_32_FLOAT;
+ return 0;
case PIPE_FORMAT_L8_UNORM:
case PIPE_FORMAT_A8_UNORM:
case PIPE_FORMAT_I8_UNORM:
@@ -60,8 +67,6 @@ int r600_conv_pipe_format(unsigned pformat, unsigned *format)
case PIPE_FORMAT_R64G64_FLOAT:
case PIPE_FORMAT_R64G64B64_FLOAT:
case PIPE_FORMAT_R64G64B64A64_FLOAT:
- case PIPE_FORMAT_R32_FLOAT:
- case PIPE_FORMAT_R32G32_FLOAT:
case PIPE_FORMAT_R32_UNORM:
case PIPE_FORMAT_R32G32_UNORM:
case PIPE_FORMAT_R32G32B32_UNORM:
@@ -111,7 +116,7 @@ int r600_conv_pipe_format(unsigned pformat, unsigned *format)
case PIPE_FORMAT_R32G32B32_FIXED:
case PIPE_FORMAT_R32G32B32A32_FIXED:
default:
- fprintf(stderr, "%s:%d unsupported %d\n", __func__, __LINE__, pformat);
+ R600_ERR("unsupported %d\n", pformat);
return -EINVAL;
}
}