From c750f3831e13559b9453be26b2c34a59c22f4cea Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Tue, 17 Sep 2019 18:17:56 +0300 Subject: [PATCH] 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 --- apps/gl/coherent_memory_read.cpp | 2 +- apps/gl/coherent_memory_write.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/gl/coherent_memory_read.cpp b/apps/gl/coherent_memory_read.cpp index 5f94af9..3156d37 100644 --- a/apps/gl/coherent_memory_read.cpp +++ b/apps/gl/coherent_memory_read.cpp @@ -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); diff --git a/apps/gl/coherent_memory_write.cpp b/apps/gl/coherent_memory_write.cpp index f5c3017..df17c0d 100644 --- a/apps/gl/coherent_memory_write.cpp +++ b/apps/gl/coherent_memory_write.cpp @@ -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); @@ -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); } @@ -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);