summaryrefslogtreecommitdiff
path: root/src/r6xx_accel.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-03-02 02:28:57 -0500
committerAlex Deucher <alexdeucher@gmail.com>2009-03-02 02:28:57 -0500
commitfa98f424de739be2c6005b740a74bbf1ee968a8b (patch)
tree70af76e5cac9e4b6909b19d514dea93c05419a89 /src/r6xx_accel.c
parentccde35c3eda3fff0de29eb8c6fdc392629724a34 (diff)
R6xx/R7xx Xv: combine packed and planar shaders
use a bool const to select the tex fetch routine
Diffstat (limited to 'src/r6xx_accel.c')
-rw-r--r--src/r6xx_accel.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/r6xx_accel.c b/src/r6xx_accel.c
index 93c3ae37..aa2ab86b 100644
--- a/src/r6xx_accel.c
+++ b/src/r6xx_accel.c
@@ -433,6 +433,29 @@ set_alu_consts(ScrnInfoPtr pScrn, drmBufPtr ib, int offset, int count, float *co
}
void
+set_bool_consts(ScrnInfoPtr pScrn, drmBufPtr ib, int offset, int count, uint32_t *const_buf)
+{
+ int i;
+ const int countreg = count * (SQ_BOOL_CONST_offset >> 2);
+
+ PACK0(ib, SQ_BOOL_CONST + offset * SQ_BOOL_CONST_offset, countreg);
+ for (i = 0; i < countreg; i++)
+ E32(ib, const_buf[i]);
+
+}
+
+void
+set_loop_consts(ScrnInfoPtr pScrn, drmBufPtr ib, int offset, int count, uint32_t *const_buf)
+{
+ int i;
+ const int countreg = count * (SQ_LOOP_CONST_offset >> 2);
+
+ PACK0(ib, SQ_LOOP_CONST + offset * SQ_LOOP_CONST_offset, countreg);
+ for (i = 0; i < countreg; i++)
+ E32(ib, const_buf[i]);
+}
+
+void
set_vtx_resource(ScrnInfoPtr pScrn, drmBufPtr ib, vtx_resource_t *res)
{
uint32_t sq_vtx_constant_word2;