<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - using swrAVX renders incorrectly at certain resolutions"
href="https://bugs.freedesktop.org/show_bug.cgi?id=110468">110468</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>using swrAVX renders incorrectly at certain resolutions
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>19.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>major
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Drivers/Gallium/swr
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ayan908@outlook.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=144032" name="attach_144032" title="WGLINFO">attachment 144032</a> <a href="attachment.cgi?id=144032&action=edit" title="WGLINFO">[details]</a></span>
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);
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>