Skip to content

Commit ccb0fe0

Browse files
author
Danylo Piliaiev
committed
apps/gl: Make coherent memory tests require GL 4.4
Coherent memory requires GL 4.4. Do not use named buffers since they require GL 4.5. Signed-off-by: Danylo Piliaiev <[email protected]>
1 parent a547e37 commit ccb0fe0

File tree

3 files changed

+113
-113
lines changed

3 files changed

+113
-113
lines changed

apps/gl/coherent_memory_read.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ int main(int argc, char** argv)
406406
glfwInit();
407407
glfwWindowHint(GLFW_VISIBLE, GLFW_TRUE);
408408
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
409-
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
409+
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 4);
410410
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
411411
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
412412

apps/gl/coherent_memory_write.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ setup_buffers(const int width, const int height, const size_t mapping_offset,
167167
glBufferStorage(GL_SHADER_STORAGE_BUFFER, size + mapping_offset, NULL,
168168
mapping_flags);
169169

170-
coherent_colors[i] = glMapNamedBufferRange(ssbo[i], mapping_offset, size,
171-
mapping_flags);
170+
coherent_colors[i] = glMapBufferRange(GL_SHADER_STORAGE_BUFFER, mapping_offset,
171+
size, mapping_flags);
172172

173173
glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0);
174174

@@ -386,7 +386,7 @@ unmap_buffers(const int width, const int height, const size_t mapping_offset) {
386386
glBindBufferRange(GL_SHADER_STORAGE_BUFFER, i, ssbo[i],
387387
mapping_offset, size);
388388

389-
glUnmapNamedBuffer(ssbo[i]);
389+
glUnmapBuffer(GL_SHADER_STORAGE_BUFFER);
390390
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, i, 0);
391391
}
392392

@@ -403,7 +403,7 @@ main(int argc, char** argv) {
403403

404404
glfwWindowHint(GLFW_VISIBLE, GLFW_TRUE);
405405
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
406-
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
406+
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 4);
407407
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
408408
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
409409

0 commit comments

Comments
 (0)