summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i915simple/i915_strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/i915simple/i915_strings.c')
-rw-r--r--src/gallium/drivers/i915simple/i915_strings.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/gallium/drivers/i915simple/i915_strings.c b/src/gallium/drivers/i915simple/i915_strings.c
index 301fedea19..ee62bb2e5d 100644
--- a/src/gallium/drivers/i915simple/i915_strings.c
+++ b/src/gallium/drivers/i915simple/i915_strings.c
@@ -26,21 +26,31 @@
**************************************************************************/
#include "i915_context.h"
+#include "i915_screen.h"
#include "i915_reg.h"
+/** XXX temporary screen/pipe duplication here */
+
+
+static const char *i915_get_vendor_screen( struct pipe_screen *screen )
+{
+ return "Tungsten Graphics, Inc.";
+}
+
static const char *i915_get_vendor( struct pipe_context *pipe )
{
return "Tungsten Graphics, Inc.";
}
-static const char *i915_get_name( struct pipe_context *pipe )
+static const char *i915_get_name_screen( struct pipe_screen *screen )
{
+ struct i915_screen *i915screen = i915_screen(screen);
static char buffer[128];
const char *chipset;
- switch (i915_context(pipe)->pci_id) {
+ switch (i915screen->pci_id) {
case PCI_CHIP_I915_G:
chipset = "915G";
break;
@@ -75,9 +85,22 @@ static const char *i915_get_name( struct pipe_context *pipe )
}
+static const char *i915_get_name( struct pipe_context *pipe )
+{
+ return pipe->screen->get_name(pipe->screen);
+}
+
+
void
i915_init_string_functions(struct i915_context *i915)
{
i915->pipe.get_name = i915_get_name;
i915->pipe.get_vendor = i915_get_vendor;
}
+
+void
+i915_init_screen_string_functions(struct pipe_screen *screen)
+{
+ screen->get_name = i915_get_name_screen;
+ screen->get_vendor = i915_get_vendor_screen;
+}