Skip to content

Commit

Permalink
apps/gl: Make coherent memory tests require GL 4.4
Browse files Browse the repository at this point in the history
Coherent memory requires GL 4.4.
Do not use named buffers since they require GL 4.5.

Signed-off-by: Danylo Piliaiev <[email protected]>
  • Loading branch information
Danylo Piliaiev committed Sep 17, 2019
1 parent a547e37 commit c750f38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/gl/coherent_memory_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ int main(int argc, char** argv)
glfwInit();
glfwWindowHint(GLFW_VISIBLE, GLFW_TRUE);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 4);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

Expand Down
8 changes: 4 additions & 4 deletions apps/gl/coherent_memory_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ setup_buffers(const int width, const int height, const size_t mapping_offset,
glBufferStorage(GL_SHADER_STORAGE_BUFFER, size + mapping_offset, NULL,
mapping_flags);

coherent_colors[i] = glMapNamedBufferRange(ssbo[i], mapping_offset, size,
mapping_flags);
coherent_colors[i] = glMapBufferRange(GL_SHADER_STORAGE_BUFFER, mapping_offset,
size, mapping_flags);

glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0);

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

glUnmapNamedBuffer(ssbo[i]);
glUnmapBuffer(GL_SHADER_STORAGE_BUFFER);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, i, 0);
}

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

glfwWindowHint(GLFW_VISIBLE, GLFW_TRUE);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 4);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

Expand Down

0 comments on commit c750f38

Please sign in to comment.