summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-01-22 13:34:21 -0800
committerCorbin Simpson <[email protected]>2009-02-01 23:30:25 -0800
commitecb7f29f74c8f7456302267fe31b1de4bcc103c5 (patch)
tree1f86aac7d7a005755dc7e9a00796e43a3ea9919b /src/gallium/drivers
parent90a96cb2addf48b3b48c039a8dc6de9e53bfb6df (diff)
amd/r300: Wire up GETPARAM ioctls.
Whoo, stuff is starting to look cleaner and cleaner.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_chipset.c5
-rw-r--r--src/gallium/drivers/r300/r300_chipset.h2
-rw-r--r--src/gallium/drivers/r300/r300_context.c2
-rw-r--r--src/gallium/drivers/r300/r300_screen.c8
-rw-r--r--src/gallium/drivers/r300/r300_screen.h4
-rw-r--r--src/gallium/drivers/r300/r300_winsys.h5
6 files changed, 17 insertions, 9 deletions
diff --git a/src/gallium/drivers/r300/r300_chipset.c b/src/gallium/drivers/r300/r300_chipset.c
index b7de2359cbd..f2dc8aedaad 100644
--- a/src/gallium/drivers/r300/r300_chipset.c
+++ b/src/gallium/drivers/r300/r300_chipset.c
@@ -26,10 +26,9 @@
* Radeons. */
/* Parse a PCI ID and fill an r300_capabilities struct with information. */
-void r300_parse_chipset(uint32_t pci_id, struct r300_capabilities* caps)
+void r300_parse_chipset(struct r300_capabilities* caps)
{
/* Reasonable defaults */
- caps->pci_id = pci_id;
caps->has_tcl = TRUE;
caps->is_r500 = FALSE;
caps->num_vert_pipes = 4;
@@ -38,7 +37,7 @@ void r300_parse_chipset(uint32_t pci_id, struct r300_capabilities* caps)
/* Note: These are not ordered by PCI ID. I leave that task to GCC,
* which will perform the ordering while collating jump tables. Instead,
* I've tried to group them according to capabilities and age. */
- switch (pci_id) {
+ switch (caps->pci_id) {
case 0x4144:
caps->family = CHIP_FAMILY_R300;
break;
diff --git a/src/gallium/drivers/r300/r300_chipset.h b/src/gallium/drivers/r300/r300_chipset.h
index 548d7a6c500..f1502ff76c5 100644
--- a/src/gallium/drivers/r300/r300_chipset.h
+++ b/src/gallium/drivers/r300/r300_chipset.h
@@ -100,6 +100,6 @@ static const char* chip_families[] = {
"RV570"
};
-void r300_parse_chipset(uint32_t pci_id, struct r300_capabilities* caps);
+void r300_parse_chipset(struct r300_capabilities* caps);
#endif /* R300_CHIPSET_H */
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 467594ec9b6..f254b2f2a32 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -43,7 +43,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300->winsys = r300_winsys;
r300->context.winsys = winsys;
- r300->context.screen = r300_create_screen(winsys, r300_winsys->pci_id);
+ r300->context.screen = r300_create_screen(winsys, r300_winsys);
r300->context.destroy = r300_destroy_context;
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index a241d606c0c..63ddd3b6a62 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -149,7 +149,8 @@ static void r300_destroy_screen(struct pipe_screen* pscreen)
FREE(r300screen);
}
-struct pipe_screen* r300_create_screen(struct pipe_winsys* winsys, uint32_t pci_id)
+struct pipe_screen* r300_create_screen(struct pipe_winsys* winsys,
+ struct r300_winsys* r300_winsys)
{
struct r300_screen* r300screen = CALLOC_STRUCT(r300_screen);
struct r300_capabilities* caps = CALLOC_STRUCT(r300_capabilities);
@@ -157,7 +158,10 @@ struct pipe_screen* r300_create_screen(struct pipe_winsys* winsys, uint32_t pci_
if (!r300screen || !caps)
return NULL;
- r300_parse_chipset(pci_id, caps);
+ caps->pci_id = r300_winsys->pci_id;
+ caps->num_frag_pipes = r300_winsys->gb_pipes;
+
+ r300_parse_chipset(caps);
r300screen->caps = caps;
r300screen->screen.winsys = winsys;
diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h
index b6c3d1f462f..83d5a75d0a2 100644
--- a/src/gallium/drivers/r300/r300_screen.h
+++ b/src/gallium/drivers/r300/r300_screen.h
@@ -28,6 +28,7 @@
#include "util/u_memory.h"
#include "r300_chipset.h"
+#include "r300_winsys.h"
struct r300_screen {
/* Parent class */
@@ -43,6 +44,7 @@ static struct r300_screen* r300_screen(struct pipe_screen* screen) {
}
/* Creates a new r300 screen. */
-struct pipe_screen* r300_create_screen(struct pipe_winsys* winsys, uint pci_id);
+struct pipe_screen* r300_create_screen(struct pipe_winsys* winsys,
+ struct r300_winsys* r300_winsys);
#endif /* R300_SCREEN_H */
diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h
index 319152c8536..867d65b7de1 100644
--- a/src/gallium/drivers/r300/r300_winsys.h
+++ b/src/gallium/drivers/r300/r300_winsys.h
@@ -41,6 +41,9 @@ struct r300_winsys {
/* PCI ID */
uint32_t pci_id;
+ /* GB pipe count */
+ uint32_t gb_pipes;
+
/* CS object. This is very much like Intel's batchbuffer.
* Fill it full of dwords and relocs and then submit.
* Repeat as needed. */
@@ -89,4 +92,4 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
}
#endif
-#endif /* R300_WINSYS_H */ \ No newline at end of file
+#endif /* R300_WINSYS_H */