summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_pipe.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2014-01-30 04:19:57 +0000
committerDave Airlie <[email protected]>2014-02-05 10:49:43 +1000
commit79ea0f4506995c010320d56cd9dbfbefa34ab6f2 (patch)
treecd20bb1639da0c815f8e9370888b750140a574b6 /src/gallium/drivers/r600/r600_pipe.c
parentccea799ee3fbefaf6d97c21bbf3e38f857f91d87 (diff)
r600g: add support for geom shaders to r600/r700 chipsets (v2)
This is my first attempt at enabling r600/r700 geometry shaders, the basic tests pass on both my rv770 and my rv635, It requires this kernel patch: http://www.spinics.net/lists/dri-devel/msg52745.html v2: address Alex comments. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.c')
-rw-r--r--src/gallium/drivers/r600/r600_pipe.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 47ada0702e5..6c72d075757 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -372,7 +372,12 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
return 1;
case PIPE_CAP_GLSL_FEATURE_LEVEL:
- return family >= CHIP_CEDAR ? 330 : 140;
+ if (family >= CHIP_CEDAR)
+ return 330;
+ /* pre-evergreen geom shaders need newer kernel */
+ if (rscreen->b.info.drm_minor >= 37)
+ return 330;
+ return 140;
/* Supported except the original R600. */
case PIPE_CAP_INDEP_BLEND_ENABLE:
@@ -456,9 +461,12 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e
case PIPE_SHADER_COMPUTE:
break;
case PIPE_SHADER_GEOMETRY:
- if (rscreen->b.chip_class < EVERGREEN)
- return 0;
- break;
+ if (rscreen->b.family >= CHIP_CEDAR)
+ break;
+ /* pre-evergreen geom shaders need newer kernel */
+ if (rscreen->b.info.drm_minor >= 37)
+ break;
+ return 0;
default:
/* XXX: support tessellation on Evergreen */
return 0;