summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/egl-static/egl_pipe.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2012-10-27 11:07:34 -0500
committerRob Clark <[email protected]>2013-03-11 21:53:24 -0400
commit6173cc19c45d92ef0b7bc6aa008aa89bb29abbda (patch)
tree50b2d2fca779e88ad8f143d08901dfb01fc36096 /src/gallium/targets/egl-static/egl_pipe.c
parent44a8e5135470fa51ae36b304f3c5286bf9cca259 (diff)
freedreno: gallium driver for adreno
Currently works on a220. Others in the a2xx family look pretty similar and should be pretty straightforward to support with the same driver. The a3xx has a new shader ISA, and while many registers appear similar, the register addresses have been completely shuffled around. I am not sure yet whether it is best to support with the same driver, but different compiler, or whether it should be split into a different driver. v1: original v2: build file updates from review comments, and remove GPL licensed header files from msm kernel v3: smarter temp/pred register assignment, fix clear and depth/stencil format issues, resource_transfer fixes, scissor fixes Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/targets/egl-static/egl_pipe.c')
-rw-r--r--src/gallium/targets/egl-static/egl_pipe.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/targets/egl-static/egl_pipe.c b/src/gallium/targets/egl-static/egl_pipe.c
index 407c6a8f236..e05490b5580 100644
--- a/src/gallium/targets/egl-static/egl_pipe.c
+++ b/src/gallium/targets/egl-static/egl_pipe.c
@@ -45,6 +45,8 @@
/* for vmwgfx */
#include "svga/drm/svga_drm_public.h"
#include "svga/svga_public.h"
+/* for freedreno */
+#include "freedreno/drm/freedreno_drm_public.h"
static struct pipe_screen *
pipe_i915_create_screen(int fd)
@@ -179,6 +181,24 @@ pipe_vmwgfx_create_screen(int fd)
#endif
}
+static struct pipe_screen *
+pipe_freedreno_create_screen(int fd)
+{
+#if _EGL_PIPE_FREEDRENO
+ struct pipe_screen *screen;
+
+ screen = fd_drm_screen_create(fd);
+ if (!screen)
+ return NULL;
+
+ screen = debug_screen_wrap(screen);
+
+ return screen;
+#else
+ return NULL;
+#endif
+}
+
struct pipe_screen *
egl_pipe_create_drm_screen(const char *name, int fd)
{
@@ -194,6 +214,8 @@ egl_pipe_create_drm_screen(const char *name, int fd)
return pipe_radeonsi_create_screen(fd);
else if (strcmp(name, "vmwgfx") == 0)
return pipe_vmwgfx_create_screen(fd);
+ else if (strcmp(name, "kgsl") == 0)
+ return pipe_freedreno_create_screen(fd);
else
return NULL;
}