aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/r300_emit.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2008-03-21 17:05:29 +1000
committerAlex Deucher <[email protected]>2008-05-02 15:13:48 -0400
commit3b7c5bfb98cd4d3b675ac39ec62d0fa71a66a6dd (patch)
treecf5997fc8d9797d2fda939eca30969e66b174135 /src/mesa/drivers/dri/r300/r300_emit.h
parent6443da0865a6ad8bdd7abc65a9621ba329fcb756 (diff)
r500: setup fragment program constant emission atom
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_emit.h')
-rw-r--r--src/mesa/drivers/dri/r300/r300_emit.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_emit.h b/src/mesa/drivers/dri/r300/r300_emit.h
index 50e7e4f1497..51302301f7b 100644
--- a/src/mesa/drivers/dri/r300/r300_emit.h
+++ b/src/mesa/drivers/dri/r300/r300_emit.h
@@ -74,14 +74,16 @@ static inline uint32_t cmdvpu(int addr, int count)
return cmd.u;
}
-static inline uint32_t cmdr500fp(int addr, int count)
+static inline uint32_t cmdr500fp(int addr, int count, int type, int clamp)
{
drm_r300_cmd_header_t cmd;
- cmd.vpu.cmd_type = R300_CMD_R500FP;
- cmd.vpu.count = count;
- cmd.vpu.adrhi = ((unsigned int)addr & 0xFF00) >> 8;
- cmd.vpu.adrlo = ((unsigned int)addr & 0x00FF);
+ cmd.r500fp.cmd_type = R300_CMD_R500FP;
+ cmd.r500fp.count = count;
+ cmd.r500fp.adrhi_flags = ((unsigned int)addr & 0x100) >> 8;
+ cmd.r500fp.adrhi_flags |= type ? R500FP_CONSTANT_TYPE : 0;
+ cmd.r500fp.adrhi_flags |= clamp ? R500FP_CONSTANT_CLAMP : 0;
+ cmd.r500fp.adrlo = ((unsigned int)addr & 0x00FF);
return cmd.u;
}
@@ -188,7 +190,7 @@ static inline uint32_t cmdpacify(void)
__FUNCTION__); \
cmd_reserved = _n+1; \
cmd_written =1; \
- cmd[0].i = cmdr500fp((dest), _n/6); \
+ cmd[0].i = cmdr500fp((dest), _n/6, 0, 0); \
} while (0);
#define start_packet3(packet, count) \