简体   繁体   中英

Program crashes on accessing SSBO in shader

Whenever I try to access an SSBO, I get an error, saying atio6axx.pdb not loaded .

My graphics card (AMD) drivers are updated, but funnily enough while searching for a solution I found this thread, which was posted only a few hours ago, so could this be a driver issue? I searched my PC and found the .dll but not the .pdb , could this be the issue? I've got VS set to loading symbols from Microsoft Symbol Servers but not NuGet.org Symbol Servers.

Relevant code:

Shader (simplified to only show necessary code):

#version 430 core

layout(binding = 5, std430) buffer test
{
    float t[];
};

out vec4 colour;

void main()
{
    colour = vec4(test.t[0], test.t[1], test.t[2], 1);
}

Creating the SSBO:

float test[3] { 0, 10, 0 };

glGenBuffers(1, &ss_id);
glBindBuffer(GL_SHADER_STORAGE_BUFFER, ss_id);
glBufferData(GL_SHADER_STORAGE_BUFFER, sizeof(float) * 3, test, GL_STATIC_READ);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 5, ss_id);
glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0);

Any help is appreciated

For anyone else having this issue, I found out why it was happening. I was referring to the data in the SSBO with test.t[0] , when instead it should have been just t[0] .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM