Bug 65773

Summary: piglit return-01.vert regression
Product: Mesa Reporter: Vinson Lee <vlee>
Component: glsl-compilerAssignee: Ian Romanick <idr>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: mattst88
Version: gitKeywords: regression
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Vinson Lee 2013-06-15 01:12:45 UTC
mesa: 1b77d2133c41c4eb475b81967a3e4d39196c7fe1 (master)

$ ./bin/glslparsertest tests/spec/glsl-1.10/compiler/expressions/return-01.vert pass 1.10
Failed to compile vertex shader tests/spec/glsl-1.10/compiler/expressions/return-01.vert: 0:15(13): error: void functions can only use `return' without a return argument

Shader source:
// [config]
// expect_result: pass
// glsl_version: 1.10
// [end config]

#ifdef GL_ES
precision mediump float;
#endif

void A(int i) { }

void B(int i) {
	// This is crazy, but not technically illegal.  The value of A(i) has
	// void type, and the return type of the function is void.
	return A(i);
}

attribute vec4 vertex;

void main() {
	B(1);
	gl_Position = vertex;
}

PIGLIT: {'result': 'fail' }


fcaa48d9cc8937e0ceb59dfd22ef5b6e6fd1a273 is the first bad commit
commit fcaa48d9cc8937e0ceb59dfd22ef5b6e6fd1a273
Author: Matt Turner <mattst88@gmail.com>
Date:   Wed May 22 14:57:04 2013 -0700

    glsl: Disallow return with a void argument from void functions.
    
    NOTE: This is a candidate for the stable branches.
    
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

:040000 040000 0f448ec3ac51a8f685bb03e735b7af29d6cfb704 507f7f5b5427049ad3ed5fcdbd0f2177dbdd1924 M	src
bisect run success
Comment 1 Matt Turner 2013-06-15 01:17:47 UTC
Oh, yeah. I just didn't push my piglit patches.

Pushed as http://cgit.freedesktop.org/piglit/commit/?id=abb554b527f5eb685ed8f7e274a2578139946bdd

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.