diff options
author | Kristian Høgsberg <[email protected]> | 2014-08-15 15:59:59 -0700 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2014-08-15 16:09:11 -0700 |
commit | 14c1a2a94c3d7c0ba375d2b0953b025112b21392 (patch) | |
tree | 857854d87e8359f1a930716da211785f9431b8b7 /src/mesa | |
parent | 1e1d2857011cce13c1d67eec6711381debcd26f3 (diff) |
i965: Guard access to gl_Layer by extension #ifdef
Only assign gl_Layer if we have GL_AMD_vertex_shader_layer. Gen6 doesn't
(currently) have that extension, but it also doesn't support layered
rendering.
Signed-off-by: Kristian Høgsberg <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Tested-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_meta_fast_clear.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c index c6540f20a07..5f3817bd978 100644 --- a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c +++ b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c @@ -97,7 +97,9 @@ brw_bind_rep_write_shader(struct brw_context *brw, float *color) "uniform int layer;\n" "void main()\n" "{\n" + "#ifdef GL_AMD_vertex_shader_layer\n" " gl_Layer = gl_InstanceID;\n" + "#endif\n" " gl_Position = position;\n" "}\n"; const char *fs_source = |