Module: Mesa Branch: master Commit: 14c1a2a94c3d7c0ba375d2b0953b025112b21392 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=14c1a2a94c3d7c0ba375d2b0953b025112b21392
Author: Kristian Høgsberg <[email protected]> Date: Fri Aug 15 15:59:59 2014 -0700 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]> --- src/mesa/drivers/dri/i965/brw_meta_fast_clear.c | 2 ++ 1 file changed, 2 insertions(+) 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 c6540f2..5f3817b 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 = _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
