diff options
author | Rob Clark <[email protected]> | 2012-10-27 11:07:34 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2013-03-11 21:53:24 -0400 |
commit | 6173cc19c45d92ef0b7bc6aa008aa89bb29abbda (patch) | |
tree | 50b2d2fca779e88ad8f143d08901dfb01fc36096 /src/gallium/targets/egl-static | |
parent | 44a8e5135470fa51ae36b304f3c5286bf9cca259 (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')
-rw-r--r-- | src/gallium/targets/egl-static/Makefile.am | 9 | ||||
-rw-r--r-- | src/gallium/targets/egl-static/egl_pipe.c | 22 |
2 files changed, 31 insertions, 0 deletions
diff --git a/src/gallium/targets/egl-static/Makefile.am b/src/gallium/targets/egl-static/Makefile.am index 5c40ae8e145..31dbc791ddc 100644 --- a/src/gallium/targets/egl-static/Makefile.am +++ b/src/gallium/targets/egl-static/Makefile.am @@ -191,6 +191,15 @@ egl_gallium_la_LIBADD += \ $(top_builddir)/src/gallium/drivers/svga/libsvga.la endif +if HAVE_GALLIUM_FREEDRENO +AM_CPPFLAGS += -D_EGL_PIPE_FREEDRENO=1 +egl_gallium_la_LIBADD += \ + $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \ + $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \ + $(FREEDRENO_LIBS) + +endif + if HAVE_GALLIUM_SOFTPIPE AM_CPPFLAGS += -DGALLIUM_SOFTPIPE -DGALLIUM_RBUG -DGALLIUM_TRACE egl_gallium_la_LIBADD += \ 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; } |