aboutsummaryrefslogtreecommitdiff
path: root/vendor/OpenGL
diff options
context:
space:
mode:
authorPhil <homan.phil@gmail.com>2022-06-23 22:59:42 -0700
committerPhil <homan.phil@gmail.com>2022-06-27 14:50:24 -0700
commitb89bb877599d1b966ed831343503bb74e7e43908 (patch)
treedc713cbb2bc4a8529d500730a3274dcd1d2e6f30 /vendor/OpenGL
parent2cbb3d5a24398784ffb8534d8a255c61b9e3160f (diff)
Add OpenGL bindless textures ARB api to vendor
Diffstat (limited to 'vendor/OpenGL')
-rw-r--r--vendor/OpenGL/impl.odin44
-rw-r--r--vendor/OpenGL/wrappers.odin30
2 files changed, 74 insertions, 0 deletions
diff --git a/vendor/OpenGL/impl.odin b/vendor/OpenGL/impl.odin
index 530865cb0..e9adda4bd 100644
--- a/vendor/OpenGL/impl.odin
+++ b/vendor/OpenGL/impl.odin
@@ -947,6 +947,13 @@ impl_DrawTransformFeedbackStream: proc "c" (mode: u32, id: u32, stream: u32)
impl_BeginQueryIndexed: proc "c" (target: u32, index: u32, id: u32)
impl_EndQueryIndexed: proc "c" (target: u32, index: u32)
impl_GetQueryIndexediv: proc "c" (target: u32, index: u32, pname: u32, params: [^]i32)
+impl_GetTextureHandleARB: proc "c" (texture: u32) -> u64
+impl_GetTextureSamplerHandleARB: proc "c" (texture, sampler: u32) -> u64
+impl_GetImageHandleARB: proc "c" (texture: u32, level: i32, layered: bool, layer: i32, format: u32) -> u64
+impl_MakeTextureHandleResidentARB: proc "c" (handle: u64)
+impl_MakeImageHandleResidentARB: proc "c" (handle: u64, access: u32)
+impl_MakeTextureHandleNonResidentARB:proc "c" (handle: u64)
+impl_MakeImageHandleNonResidentARB: proc "c" (handle: u64)
load_4_0 :: proc(set_proc_address: Set_Proc_Address_Type) {
set_proc_address(&impl_MinSampleShading, "glMinSampleShading")
@@ -995,6 +1002,42 @@ load_4_0 :: proc(set_proc_address: Set_Proc_Address_Type) {
set_proc_address(&impl_BeginQueryIndexed, "glBeginQueryIndexed")
set_proc_address(&impl_EndQueryIndexed, "glEndQueryIndexed")
set_proc_address(&impl_GetQueryIndexediv, "glGetQueryIndexediv")
+
+ // Load ARB (architecture review board, vendor specific) extensions that might be available
+ set_proc_address(&impl_GetTextureHandleARB, "glGetTextureHandleARB")
+ if impl_GetTextureHandleARB == nil {
+ set_proc_address(&impl_GetTextureHandleARB, "glGetTextureHandleNV")
+ }
+
+ set_proc_address(&impl_GetTextureSamplerHandleARB, "glGetTextureSamplerHandleARB")
+ if impl_GetTextureSamplerHandleARB == nil {
+ set_proc_address(&impl_GetTextureSamplerHandleARB, "glGetTextureSamplerHandleNV")
+ }
+
+ set_proc_address(&impl_GetImageHandleARB, "glGetImageHandleARB")
+ if impl_GetImageHandleARB == nil {
+ set_proc_address(&impl_GetImageHandleARB, "glGetImageHandleNV")
+ }
+
+ set_proc_address(&impl_MakeTextureHandleResidentARB, "glMakeTextureHandleResidentARB")
+ if impl_MakeTextureHandleResidentARB == nil {
+ set_proc_address(&impl_MakeTextureHandleResidentARB, "glMakeTextureHandleResidentNV")
+ }
+
+ set_proc_address(&impl_MakeImageHandleResidentARB, "glMakeImageHandleResidentARB")
+ if impl_MakeImageHandleResidentARB == nil {
+ set_proc_address(&impl_MakeImageHandleResidentARB, "glMakeImageHandleResidentNV")
+ }
+
+ set_proc_address(&impl_MakeTextureHandleNonResidentARB, "glMakeTextureHandleNonResidentARB")
+ if impl_MakeTextureHandleNonResidentARB == nil {
+ set_proc_address(&impl_MakeTextureHandleNonResidentARB, "glMakeTextureHandleNonResidentNV")
+ }
+
+ set_proc_address(&impl_MakeImageHandleNonResidentARB, "glMakeImageHandleNonResidentARB")
+ if impl_MakeImageHandleNonResidentARB == nil {
+ set_proc_address(&impl_MakeImageHandleNonResidentARB, "glMakeImageHandleNonResidentNV")
+ }
}
@@ -1594,3 +1637,4 @@ load_4_6 :: proc(set_proc_address: Set_Proc_Address_Type) {
set_proc_address(&impl_MultiDrawElementsIndirectCount, "glMultiDrawElementsIndirectCount")
set_proc_address(&impl_PolygonOffsetClamp, "glPolygonOffsetClamp")
}
+
diff --git a/vendor/OpenGL/wrappers.odin b/vendor/OpenGL/wrappers.odin
index c0b5304b0..bb71b0e82 100644
--- a/vendor/OpenGL/wrappers.odin
+++ b/vendor/OpenGL/wrappers.odin
@@ -449,6 +449,20 @@ when !ODIN_DEBUG {
BeginQueryIndexed :: proc "c" (target: u32, index: u32, id: u32) { impl_BeginQueryIndexed(target, index, id) }
EndQueryIndexed :: proc "c" (target: u32, index: u32) { impl_EndQueryIndexed(target, index) }
GetQueryIndexediv :: proc "c" (target: u32, index: u32, pname: u32, params: [^]i32) { impl_GetQueryIndexediv(target, index, pname, params) }
+ GetTextureHandleARB :: proc "c" (texture: u32) -> u64
+ { return impl_GetTextureHandleARB(texture) }
+ GetTextureSamplerHandleARB :: proc "c" (texture, sampler: u32) -> u64
+ { return impl_GetTextureSamplerHandleARB(texture, sampler) }
+ GetImageHandleARB :: proc "c" (texture: u32, level: i32, layered: bool, layer: i32, format: u32) -> u64
+ { return impl_GetImageHandleARB(texture, level, layered, layer, format) }
+ MakeTextureHandleResidentARB :: proc "c" (handle: u64)
+ { impl_MakeTextureHandleResidentARB(handle) }
+ MakeImageHandleResidentARB :: proc "c" (handle: u64, access: u32)
+ { impl_MakeImageHandleResidentARB(handle, access) }
+ MakeTextureHandleNonResidentARB:: proc "c" (handle: u64)
+ { impl_MakeTextureHandleNonResidentARB(handle) }
+ MakeImageHandleNonResidentARB :: proc "c" (handle: u64)
+ { impl_MakeImageHandleNonResidentARB(handle) }
// VERSION_4_1
ReleaseShaderCompiler :: proc "c" () { impl_ReleaseShaderCompiler() }
@@ -1249,6 +1263,22 @@ when !ODIN_DEBUG {
BeginQueryIndexed :: proc "c" (target: u32, index: u32, id: u32, loc := #caller_location) { impl_BeginQueryIndexed(target, index, id); debug_helper(loc, 0, target, index, id) }
EndQueryIndexed :: proc "c" (target: u32, index: u32, loc := #caller_location) { impl_EndQueryIndexed(target, index); debug_helper(loc, 0, target, index) }
GetQueryIndexediv :: proc "c" (target: u32, index: u32, pname: u32, params: [^]i32, loc := #caller_location) { impl_GetQueryIndexediv(target, index, pname, params); debug_helper(loc, 0, target, index, pname, params) }
+ GetTextureHandleARB :: proc "c" (target: u32, loc := #caller_location) -> u64
+ { ret := impl_GetTextureHandleARB(target); debug_helper(loc, 0, target); return ret }
+ GetTextureSamplerHandleARB :: proc "c" (texture, sampler: u32, loc := #caller_location) -> u64
+ { ret := impl_GetTextureSamplerHandleARB(texture, sampler); debug_helper(loc, 0, texture, sampler); return ret; }
+ GetImageHandleARB :: proc "c" (texture: u32, level: i32, layered: bool, layer: i32, format: u32, loc := #caller_location) -> u64
+ { ret := impl_GetImageHandleARB(texture, level, layered, layer, format); debug_helper(loc, 0, texture, level, layered, layer, format); return ret; }
+ MakeTextureHandleResidentARB :: proc "c" (handle: u64, loc := #caller_location)
+ { impl_MakeTextureHandleResidentARB(handle); debug_helper(loc, 0, handle) }
+ MakeImageHandleResidentARB :: proc "c" (handle: u64, access: u32, loc := #caller_location)
+ { impl_MakeImageHandleResidentARB(handle, access); debug_helper(loc, 0, handle, access) }
+ MakeTextureHandleNonResidentARB:: proc "c" (handle: u64, loc := #caller_location)
+ { impl_MakeTextureHandleNonResidentARB(handle); debug_helper(loc, 0, handle) }
+ MakeImageHandleNonResidentARB :: proc "c" (handle: u64, loc := #caller_location)
+ { impl_MakeImageHandleNonResidentARB(handle); debug_helper(loc, 0, handle) }
+
+
// VERSION_4_1
ReleaseShaderCompiler :: proc "c" (loc := #caller_location) { impl_ReleaseShaderCompiler(); debug_helper(loc, 0) }