From 3add9494037e7c88b5e5a476001176784d743a26 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 17 Mar 2008 11:08:03 +1000 Subject: initial r500 RS and FP register and upload code --- shared-core/radeon_drm.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'shared-core/radeon_drm.h') diff --git a/shared-core/radeon_drm.h b/shared-core/radeon_drm.h index 0971f970..3437320f 100644 --- a/shared-core/radeon_drm.h +++ b/shared-core/radeon_drm.h @@ -228,6 +228,7 @@ typedef union { # define R300_WAIT_2D_CLEAN 0x3 # define R300_WAIT_3D_CLEAN 0x4 #define R300_CMD_SCRATCH 8 +#define R300_CMD_R500FP 9 typedef union { unsigned int u; @@ -256,6 +257,9 @@ typedef union { struct { unsigned char cmd_type, reg, n_bufs, flags; } scratch; + struct { + unsigned char cmd_type, count, adrlo, adrhi; + } r500fp; } drm_r300_cmd_header_t; #define RADEON_FRONT 0x1 -- cgit v1.2.3 From 36e11dd3801734ff5af9f5edb7aa698f0e2c49c2 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 21 Mar 2008 16:59:52 +1000 Subject: r500: fragment program upload is also used to upload constants. Limit frag address to 8 bits --- shared-core/radeon_drm.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'shared-core/radeon_drm.h') diff --git a/shared-core/radeon_drm.h b/shared-core/radeon_drm.h index 3437320f..c4d9cc6b 100644 --- a/shared-core/radeon_drm.h +++ b/shared-core/radeon_drm.h @@ -258,7 +258,7 @@ typedef union { unsigned char cmd_type, reg, n_bufs, flags; } scratch; struct { - unsigned char cmd_type, count, adrlo, adrhi; + unsigned char cmd_type, count, adrlo, adrhi_flags; } r500fp; } drm_r300_cmd_header_t; @@ -270,6 +270,9 @@ typedef union { #define RADEON_USE_HIERZ 0x40000000 #define RADEON_USE_COMP_ZBUF 0x20000000 +#define R500FP_CONSTANT_TYPE (1 << 1) +#define R500FP_CONSTANT_CLAMP (1 << 2) + /* Primitive types */ #define RADEON_POINTS 0x1 -- cgit v1.2.3 From 753a4bdf1b554490f7b288c0203050b5114433c3 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sun, 30 Mar 2008 07:33:39 +1000 Subject: drm/r300: fix wait interface mixup This interface was defined completely wrong, however userspace has only ever used 4 values from it (0x1, 0x2, 0x3 and 0x6), so fix the interface to do what userspace actually expected but define new defines for new users to use it properly. --- shared-core/radeon_drm.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'shared-core/radeon_drm.h') diff --git a/shared-core/radeon_drm.h b/shared-core/radeon_drm.h index c4d9cc6b..67c35585 100644 --- a/shared-core/radeon_drm.h +++ b/shared-core/radeon_drm.h @@ -225,8 +225,20 @@ typedef union { #define R300_CMD_WAIT 7 # define R300_WAIT_2D 0x1 # define R300_WAIT_3D 0x2 +/* these two defines are DOING IT WRONG - however + * we have userspace which relies on using these. + * The wait interface is backwards compat new + * code should use the NEW_WAIT defines below + * THESE ARE NOT BIT FIELDS + */ # define R300_WAIT_2D_CLEAN 0x3 # define R300_WAIT_3D_CLEAN 0x4 + +# define R300_NEW_WAIT_2D_3D 0x3 +# define R300_NEW_WAIT_2D_2D_CLEAN 0x4 +# define R300_NEW_WAIT_3D_3D_CLEAN 0x6 +# define R300_NEW_WAIT_2D_2D_CLEAN_3D_3D_CLEAN 0x8 + #define R300_CMD_SCRATCH 8 #define R300_CMD_R500FP 9 -- cgit v1.2.3