[Mesa-dev] [Bug 110468] using swrAVX renders incorrectly at certain resolutions
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Apr 18 09:09:15 UTC 2019
https://bugs.freedesktop.org/show_bug.cgi?id=110468
Bug ID: 110468
Summary: using swrAVX renders incorrectly at certain
resolutions
Product: Mesa
Version: 19.0
Hardware: x86-64 (AMD64)
OS: Windows (All)
Status: NEW
Severity: major
Priority: medium
Component: Drivers/Gallium/swr
Assignee: mesa-dev at lists.freedesktop.org
Reporter: ayan908 at outlook.com
QA Contact: mesa-dev at lists.freedesktop.org
Created attachment 144032
--> https://bugs.freedesktop.org/attachment.cgi?id=144032&action=edit
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);
}
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190418/f7b63a79/attachment-0001.html>
More information about the mesa-dev
mailing list