Adding --vendor_gl_extensions flag to disable NV stuff.

This commit is contained in:
Ben Vanik
2015-01-03 13:40:20 -08:00
parent 76c41edfd6
commit 70c0c0fea1
4 changed files with 14 additions and 4 deletions

View File

@@ -11,6 +11,7 @@
#include <poly/assert.h>
#include <poly/math.h>
#include <xenia/gpu/gl4/gl4_gpu-private.h>
#include <xenia/gpu/gpu-private.h>
namespace xe {
@@ -44,7 +45,7 @@ bool CircularBuffer::Initialize() {
return false;
}
if (GLEW_NV_shader_buffer_load) {
if (FLAGS_vendor_gl_extensions && GLEW_NV_shader_buffer_load) {
// To use this bindlessly we must make it resident.
glMakeNamedBufferResidentNV(buffer_, GL_WRITE_ONLY);
glGetNamedBufferParameterui64vNV(buffer_, GL_BUFFER_GPU_ADDRESS_NV,
@@ -58,7 +59,7 @@ void CircularBuffer::Shutdown() {
return;
}
glUnmapNamedBuffer(buffer_);
if (GLEW_NV_shader_buffer_load) {
if (FLAGS_vendor_gl_extensions && GLEW_NV_shader_buffer_load) {
glMakeNamedBufferNonResidentNV(buffer_);
}
glDeleteBuffers(1, &buffer_);