![]() Also till num_groups_x=16 it does not need any memory functions in shader as well. Getting correct results till num_groups_x =16. GlMemoryBarrier(GL_BUFFER_UPDATE_BARRIER_BIT) īuffer = (GLint*)glMapBufferRange(GL_SHADER_STORAGE_BUFFER, 0, 4, GL_MAP_READ_BIT) īut for every execution I am getting random values of 'result' buffer variable.Tried to use memory functions, but still not working. GlBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, bufferObj) GlBufferData(GL_SHADER_STORAGE_BUFFER, 4, NULL, GL_DYNAMIC_READ) GlBindBuffer(GL_SHADER_STORAGE_BUFFER, bufferObj) ![]() In program, launching work group as glGenBuffers(1, &bufferObj, nResult) Thus was experimenting below code.Ĭompute shader: layout (local_size_x = 128, local_size_y = 1, local_size_z = 1) in I want to know how memory built-in functions works in compute shaders.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |