summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_shader.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-07-02 15:27:17 +1000
committerDave Airlie <[email protected]>2010-07-02 15:27:17 +1000
commit8556b77c56f3f1f0e75ce46d6b5c0d84c7b4eabd (patch)
tree9157c30056afe4b8b341c06de16a1715218682f0 /src/gallium/drivers/r600/r600_shader.h
parent44732103b2b7a8765299e586fb3b9bf91e32f6d4 (diff)
r600: use gallium list macros instead of making our own.
before this change, r600 glxinfo segfaulted in the list code, and I wasn't debugging another linked list implementation, its 2010 after all. So add the two missing list macros to the gallium header from X.org list header file (after fixing them), then port all r600 lists to the new header. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_shader.h')
-rw-r--r--src/gallium/drivers/r600/r600_shader.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.h b/src/gallium/drivers/r600/r600_shader.h
index 7d30ca79d1b..6e1bd1e37e5 100644
--- a/src/gallium/drivers/r600/r600_shader.h
+++ b/src/gallium/drivers/r600/r600_shader.h
@@ -35,8 +35,7 @@ struct r600_shader_operand {
};
struct r600_shader_vfetch {
- struct r600_shader_vfetch *next;
- struct r600_shader_vfetch *prev;
+ struct list_head head;
unsigned cf_addr;
struct r600_shader_operand src[2];
struct r600_shader_operand dst[4];
@@ -52,8 +51,7 @@ struct r600_shader_inst {
};
struct r600_shader_alu {
- struct r600_shader_alu *next;
- struct r600_shader_alu *prev;
+ struct list_head head;
unsigned nalu;
unsigned nliteral;
unsigned nconstant;
@@ -62,15 +60,14 @@ struct r600_shader_alu {
};
struct r600_shader_node {
- struct r600_shader_node *next;
- struct r600_shader_node *prev;
+ struct list_head head;
unsigned cf_id; /**< cf index (in dw) in byte code */
unsigned cf_addr; /**< instructions index (in dw) in byte code */
unsigned nslot; /**< number of slot (2 dw) needed by this node */
unsigned nfetch;
struct c_node *node; /**< compiler node from which this node originate */
- struct r600_shader_vfetch vfetch; /**< list of vfetch instructions */
- struct r600_shader_alu alu; /**< list of alu instructions */
+ struct list_head vfetch; /**< list of vfetch instructions */
+ struct list_head alu; /**< list of alu instructions */
};
struct r600_shader_io {
@@ -90,7 +87,7 @@ struct r600_shader {
unsigned ncf; /**< total number of cf clauses */
unsigned nslot; /**< total number of slots (2 dw) */
unsigned flat_shade; /**< are we flat shading */
- struct r600_shader_node nodes; /**< list of node */
+ struct list_head nodes; /**< list of node */
struct r600_shader_io input[32];
struct r600_shader_io output[32];
/* TODO replace GPR by some better register allocator */