[Mesa-dev] [Bug 110468] using swrAVX renders incorrectly at particular resolutions

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri May 31 18:50:12 UTC 2019


https://bugs.freedesktop.org/show_bug.cgi?id=110468

--- Comment #3 from Krzysztof Raszkowski <krzysztof.raszkowski at intel.com> ---
(In reply to ayan908 from comment #0)
> Created attachment 144032 [details]
> WGLINFO
> 
> At certain resolutions (360p, 720p, 1080p, 1440p and possibly others), the
> rendering is incorrect with GALLIUM_DRIVER=swr, using swrAVX.dll. For
> example, simply drawing a rectangle with glDrawElements results in an
> incorrectly rendered result. This works perfectly natively (with Intel's
> drivers) and with llvmpipe.
> 
> 
> Steps to reproduce:
> 
> 1) Create a window at 720p, OpenGL 3.3 Core.
> 2) Use the code below to set up the rectangle.
> 3) Draw the rectangle using glDrawElements.
> 
> 
> Code (Unfortunately, I do not know how to use glut so the window creation
> and rendering loop has been omitted):
> #include <iostream>
> 
> 
> int main()
> {
> 	// Set up OpenGL context
> 	// OpenGL 3.3 core, 720p
> 
> 	GLuint vao, vbo, ibo;
> 	GLfloat position[] =
> 	{
> 		-0.5f, -0.5f, 0.0f,
> 		0.5f, -0.5f, 0.0f,
> 		0.5f, 0.5f, 0.0f,
> 		-0.5f, 0.5f, 0.0f
> 	};
> 
> 
> 	GLuint indices[] =
> 	{
> 		0, 1, 2,
> 		0, 2, 3
> 	};
> 
> 
> 	glGenVertexArrays(1, &vao);
> 	glBindVertexArray(vao);
> 
> 	glGenBuffers(1, &vbo);
> 	glBindBuffer(GL_ARRAY_BUFFER, vbo);
> 	glBufferData(GL_ARRAY_BUFFER, sizeof(position), position, GL_STATIC_DRAW);
> 	glEnableVertexAttribArray(0);
> 	glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), 0);
> 
> 
> 	glGenBuffers(1, &ibo);
> 	glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo);
> 	glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices,
> GL_STATIC_DRAW);
> 
> 	GLuint vertex = glCreateShader(GL_VERTEX_SHADER), fragment =
> glCreateShader(GL_FRAGMENT_SHADER);
> 
> 	
> 	{
> 
> 		const char* shaderSource =
> 			"#version 330 core\n"
> 			"layout(location = 0) in vec3 position;\n"
> 			"\n"
> 			"void main()\n"
> 			"{\n"
> 			"gl_Position = vec4(position, 1.0);\n"
> 			"}\n"
> 			"";
> 
> 
> 		glShaderSource(vertex, 1, &shaderSource, 0);
> 		glCompileShader(vertex);
> 
> 		// Check compile status
> 
> 	}
> 
> 	{
> 
> 		const char* shaderSource =
> 			"#version 330 core\n"
> 			"layout(location = 0) out vec4 col;\n"
> 			"\n"
> 			"void main()\n"
> 			"{\n"
> 			"col = vec4(0.3, 0.8, 0.2, 1.0);\n"
> 			"}\n"
> 			"";
> 
> 
> 		glShaderSource(fragment, 1, &shaderSource, 0);
> 		glCompileShader(fragment);
> 
> 		// Check compile status
> 	}
> 
> 	GLuint program = glCreateProgram();
> 	glAttachShader(program, vertex);
> 	glAttachShader(program, fragment);
> 
> 	glLinkProgram(program);
> 	glValidateProgram(program);
> 
> 	// Check link status
> 	glUseProgram(program);
> 
> 	// Render using glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0);
> 
> }

Hi,
Tried on win10 (mesa from
https://gitlab.freedesktop.org/mesa/mesa/commit/5441d562433a6315ca00c0c69160ff848e5ec34a
build using scons + MSVC + LLVM 6.0.1) and works fine with 720p and swr.

Could you attach wglinfo output with GALLIUM_DRIVER=swr? 
Could you describe more how mesa was build (build parameters, compiler name,
version etc.)?
Could you describe your environment (env variables, OS version)?

Thanks,
Krzysztof

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190531/93437f7f/attachment-0001.html>


More information about the mesa-dev mailing list