Skip to content

Commit 157aa16

Browse files
committed
Re-gen.
1 parent b27d488 commit 157aa16

File tree

8 files changed

+218
-27
lines changed

8 files changed

+218
-27
lines changed

cgo_helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS.
22

3-
// WARNING: This file has automatically been generated on Mon, 23 May 2016 00:55:37 MSK.
3+
// WARNING: This file has automatically been generated on Mon, 23 May 2016 01:15:17 MSK.
44
// By http://git.io/cgogen. DO NOT EDIT.
55

66
#include "_cgo_export.h"

cgo_helpers.go

Lines changed: 180 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS.
22

3-
// WARNING: This file has automatically been generated on Mon, 23 May 2016 00:55:37 MSK.
3+
// WARNING: This file has automatically been generated on Mon, 23 May 2016 01:15:17 MSK.
44
// By http://git.io/cgogen. DO NOT EDIT.
55

66
package vulkan
@@ -10,6 +10,7 @@ package vulkan
1010
#include "vulkan/vulkan.h"
1111
#include "vulkan_wrapper.h"
1212
#include "vulkan_bridge.h"
13+
#include "android/native_window.h"
1314
#include <stdlib.h>
1415
#include "cgo_helpers.h"
1516
*/
@@ -14614,6 +14615,10 @@ func (x *AndroidSurfaceCreateInfo) PassRef() (*C.VkAndroidSurfaceCreateInfoKHR,
1461414615
refeca5c35c.flags, cflags_allocs = (C.VkAndroidSurfaceCreateFlagsKHR)(x.Flags), cgoAllocsUnknown
1461514616
allocseca5c35c.Borrow(cflags_allocs)
1461614617

14618+
var cwindow_allocs *cgoAllocMap
14619+
refeca5c35c.window, cwindow_allocs = *(**C.ANativeWindow)(unsafe.Pointer(&x.Window)), cgoAllocsUnknown
14620+
allocseca5c35c.Borrow(cwindow_allocs)
14621+
1461714622
x.refeca5c35c = refeca5c35c
1461814623
x.allocseca5c35c = allocseca5c35c
1461914624
return refeca5c35c, allocseca5c35c
@@ -14637,6 +14642,7 @@ func (x *AndroidSurfaceCreateInfo) Deref() {
1463714642
x.SType = (StructureType)(x.refeca5c35c.sType)
1463814643
x.PNext = (unsafe.Pointer)(unsafe.Pointer(x.refeca5c35c.pNext))
1463914644
x.Flags = (AndroidSurfaceCreateFlags)(x.refeca5c35c.flags)
14645+
x.Window = (*ANativeWindow)(unsafe.Pointer(x.refeca5c35c.window))
1464014646
}
1464114647

1464214648
// PassRef returns a reference.
@@ -15181,6 +15187,179 @@ func (x *DebugMarkerMarkerInfo) Deref() {
1518115187
x.Color = *(*[4]float32)(unsafe.Pointer(&x.ref234b91fd.color))
1518215188
}
1518315189

15190+
// Ref returns a reference.
15191+
func (x *ANativeWindow) Ref() *C.ANativeWindow {
15192+
if x == nil {
15193+
return nil
15194+
}
15195+
return (*C.ANativeWindow)(unsafe.Pointer(x))
15196+
}
15197+
15198+
// Free cleanups the memory using the free stdlib function on C side.
15199+
// Does nothing if object has no pointer.
15200+
func (x *ANativeWindow) Free() {
15201+
if x != nil {
15202+
C.free(unsafe.Pointer(x))
15203+
}
15204+
}
15205+
15206+
// NewANativeWindowRef initialises a new struct.
15207+
func NewANativeWindowRef(ref *C.ANativeWindow) *ANativeWindow {
15208+
return (*ANativeWindow)(unsafe.Pointer(ref))
15209+
}
15210+
15211+
// PassRef returns a reference and creates new object if no refernce yet.
15212+
func (x *ANativeWindow) PassRef() *C.ANativeWindow {
15213+
if x == nil {
15214+
x = new(ANativeWindow)
15215+
}
15216+
return (*C.ANativeWindow)(unsafe.Pointer(x))
15217+
}
15218+
15219+
// unpackArgSMappedMemoryRange transforms a sliced Go data structure into plain C format.
15220+
func unpackArgSMappedMemoryRange(x []MappedMemoryRange) (unpacked *C.VkMappedMemoryRange, allocs *cgoAllocMap) {
15221+
if x == nil {
15222+
return nil, nil
15223+
}
15224+
allocs = new(cgoAllocMap)
15225+
defer runtime.SetFinalizer(&unpacked, func(**C.VkMappedMemoryRange) {
15226+
go allocs.Free()
15227+
})
15228+
15229+
len0 := len(x)
15230+
mem0 := allocMappedMemoryRangeMemory(len0)
15231+
allocs.Add(mem0)
15232+
h0 := &sliceHeader{
15233+
Data: uintptr(mem0),
15234+
Cap: len0,
15235+
Len: len0,
15236+
}
15237+
v0 := *(*[]C.VkMappedMemoryRange)(unsafe.Pointer(h0))
15238+
for i0 := range x {
15239+
v0[i0], _ = x[i0].PassValue()
15240+
}
15241+
h := (*sliceHeader)(unsafe.Pointer(&v0))
15242+
unpacked = (*C.VkMappedMemoryRange)(unsafe.Pointer(h.Data))
15243+
return
15244+
}
15245+
15246+
// packSMappedMemoryRange reads sliced Go data structure out from plain C format.
15247+
func packSMappedMemoryRange(v []MappedMemoryRange, ptr0 *C.VkMappedMemoryRange) {
15248+
const m = 0x7fffffff
15249+
for i0 := range v {
15250+
ptr1 := (*(*[m / sizeOfMappedMemoryRangeValue]C.VkMappedMemoryRange)(unsafe.Pointer(ptr0)))[i0]
15251+
v[i0] = *NewMappedMemoryRangeRef(unsafe.Pointer(&ptr1))
15252+
}
15253+
}
15254+
15255+
// unpackArgSSparseImageMemoryRequirements transforms a sliced Go data structure into plain C format.
15256+
func unpackArgSSparseImageMemoryRequirements(x []SparseImageMemoryRequirements) (unpacked *C.VkSparseImageMemoryRequirements, allocs *cgoAllocMap) {
15257+
if x == nil {
15258+
return nil, nil
15259+
}
15260+
allocs = new(cgoAllocMap)
15261+
defer runtime.SetFinalizer(&unpacked, func(**C.VkSparseImageMemoryRequirements) {
15262+
go allocs.Free()
15263+
})
15264+
15265+
len0 := len(x)
15266+
mem0 := allocSparseImageMemoryRequirementsMemory(len0)
15267+
allocs.Add(mem0)
15268+
h0 := &sliceHeader{
15269+
Data: uintptr(mem0),
15270+
Cap: len0,
15271+
Len: len0,
15272+
}
15273+
v0 := *(*[]C.VkSparseImageMemoryRequirements)(unsafe.Pointer(h0))
15274+
for i0 := range x {
15275+
v0[i0], _ = x[i0].PassValue()
15276+
}
15277+
h := (*sliceHeader)(unsafe.Pointer(&v0))
15278+
unpacked = (*C.VkSparseImageMemoryRequirements)(unsafe.Pointer(h.Data))
15279+
return
15280+
}
15281+
15282+
// packSSparseImageMemoryRequirements reads sliced Go data structure out from plain C format.
15283+
func packSSparseImageMemoryRequirements(v []SparseImageMemoryRequirements, ptr0 *C.VkSparseImageMemoryRequirements) {
15284+
const m = 0x7fffffff
15285+
for i0 := range v {
15286+
ptr1 := (*(*[m / sizeOfSparseImageMemoryRequirementsValue]C.VkSparseImageMemoryRequirements)(unsafe.Pointer(ptr0)))[i0]
15287+
v[i0] = *NewSparseImageMemoryRequirementsRef(unsafe.Pointer(&ptr1))
15288+
}
15289+
}
15290+
15291+
// unpackArgSSparseImageFormatProperties transforms a sliced Go data structure into plain C format.
15292+
func unpackArgSSparseImageFormatProperties(x []SparseImageFormatProperties) (unpacked *C.VkSparseImageFormatProperties, allocs *cgoAllocMap) {
15293+
if x == nil {
15294+
return nil, nil
15295+
}
15296+
allocs = new(cgoAllocMap)
15297+
defer runtime.SetFinalizer(&unpacked, func(**C.VkSparseImageFormatProperties) {
15298+
go allocs.Free()
15299+
})
15300+
15301+
len0 := len(x)
15302+
mem0 := allocSparseImageFormatPropertiesMemory(len0)
15303+
allocs.Add(mem0)
15304+
h0 := &sliceHeader{
15305+
Data: uintptr(mem0),
15306+
Cap: len0,
15307+
Len: len0,
15308+
}
15309+
v0 := *(*[]C.VkSparseImageFormatProperties)(unsafe.Pointer(h0))
15310+
for i0 := range x {
15311+
v0[i0], _ = x[i0].PassValue()
15312+
}
15313+
h := (*sliceHeader)(unsafe.Pointer(&v0))
15314+
unpacked = (*C.VkSparseImageFormatProperties)(unsafe.Pointer(h.Data))
15315+
return
15316+
}
15317+
15318+
// packSSparseImageFormatProperties reads sliced Go data structure out from plain C format.
15319+
func packSSparseImageFormatProperties(v []SparseImageFormatProperties, ptr0 *C.VkSparseImageFormatProperties) {
15320+
const m = 0x7fffffff
15321+
for i0 := range v {
15322+
ptr1 := (*(*[m / sizeOfSparseImageFormatPropertiesValue]C.VkSparseImageFormatProperties)(unsafe.Pointer(ptr0)))[i0]
15323+
v[i0] = *NewSparseImageFormatPropertiesRef(unsafe.Pointer(&ptr1))
15324+
}
15325+
}
15326+
15327+
// unpackArgSBindSparseInfo transforms a sliced Go data structure into plain C format.
15328+
func unpackArgSBindSparseInfo(x []BindSparseInfo) (unpacked *C.VkBindSparseInfo, allocs *cgoAllocMap) {
15329+
if x == nil {
15330+
return nil, nil
15331+
}
15332+
allocs = new(cgoAllocMap)
15333+
defer runtime.SetFinalizer(&unpacked, func(**C.VkBindSparseInfo) {
15334+
go allocs.Free()
15335+
})
15336+
15337+
len0 := len(x)
15338+
mem0 := allocBindSparseInfoMemory(len0)
15339+
allocs.Add(mem0)
15340+
h0 := &sliceHeader{
15341+
Data: uintptr(mem0),
15342+
Cap: len0,
15343+
Len: len0,
15344+
}
15345+
v0 := *(*[]C.VkBindSparseInfo)(unsafe.Pointer(h0))
15346+
for i0 := range x {
15347+
v0[i0], _ = x[i0].PassValue()
15348+
}
15349+
h := (*sliceHeader)(unsafe.Pointer(&v0))
15350+
unpacked = (*C.VkBindSparseInfo)(unsafe.Pointer(h.Data))
15351+
return
15352+
}
15353+
15354+
// packSBindSparseInfo reads sliced Go data structure out from plain C format.
15355+
func packSBindSparseInfo(v []BindSparseInfo, ptr0 *C.VkBindSparseInfo) {
15356+
const m = 0x7fffffff
15357+
for i0 := range v {
15358+
ptr1 := (*(*[m / sizeOfBindSparseInfoValue]C.VkBindSparseInfo)(unsafe.Pointer(ptr0)))[i0]
15359+
v[i0] = *NewBindSparseInfoRef(unsafe.Pointer(&ptr1))
15360+
}
15361+
}
15362+
1518415363
// unpackArgSGraphicsPipelineCreateInfo transforms a sliced Go data structure into plain C format.
1518515364
func unpackArgSGraphicsPipelineCreateInfo(x []GraphicsPipelineCreateInfo) (unpacked *C.VkGraphicsPipelineCreateInfo, allocs *cgoAllocMap) {
1518615365
if x == nil {

cgo_helpers.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
// THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS.
22

3-
// WARNING: This file has automatically been generated on Mon, 23 May 2016 00:55:37 MSK.
3+
// WARNING: This file has automatically been generated on Mon, 23 May 2016 01:15:17 MSK.
44
// By http://git.io/cgogen. DO NOT EDIT.
55

66
#include "vulkan/vulkan.h"
77
#include "vulkan_wrapper.h"
88
#include "vulkan_bridge.h"
9+
#include "android/native_window.h"
910
#include <stdlib.h>
1011
#pragma once
1112

const.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS.
22

3-
// WARNING: This file has automatically been generated on Mon, 23 May 2016 00:55:37 MSK.
3+
// WARNING: This file has automatically been generated on Mon, 23 May 2016 01:15:17 MSK.
44
// By http://git.io/cgogen. DO NOT EDIT.
55

66
package vulkan
@@ -10,6 +10,7 @@ package vulkan
1010
#include "vulkan/vulkan.h"
1111
#include "vulkan_wrapper.h"
1212
#include "vulkan_bridge.h"
13+
#include "android/native_window.h"
1314
#include <stdlib.h>
1415
#include "cgo_helpers.h"
1516
*/

doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS.
22

3-
// WARNING: This file has automatically been generated on Mon, 23 May 2016 00:55:37 MSK.
3+
// WARNING: This file has automatically been generated on Mon, 23 May 2016 01:15:17 MSK.
44
// By http://git.io/cgogen. DO NOT EDIT.
55

66
/*

errors.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ func Error(result Result) error {
4141
return errTooManyObjects
4242
case ErrorFormatNotSupported:
4343
return errFormatNotSupported
44-
case ErrorSurfaceLostKhr:
44+
case ErrorSurfaceLost:
4545
return errSurfaceLostKHR
46-
case ErrorNativeWindowInUseKhr:
46+
case ErrorNativeWindowInUse:
4747
return errNativeWindowInUseKHR
48-
case SuboptimalKhr:
48+
case Suboptimal:
4949
return warnSuboptimalKHR
50-
case ErrorOutOfDateKhr:
50+
case ErrorOutOfDate:
5151
return errOutOfDateKHR
52-
case ErrorIncompatibleDisplayKhr:
52+
case ErrorIncompatibleDisplay:
5353
return errIncompatibleDisplayKHR
54-
case ErrorValidationFailedExt:
54+
case ErrorValidationFailed:
5555
return errValidationFailedEXT
5656
case ErrorInvalidShaderNv:
5757
return errInvalidShaderNV

types.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS.
22

3-
// WARNING: This file has automatically been generated on Mon, 23 May 2016 00:55:37 MSK.
3+
// WARNING: This file has automatically been generated on Mon, 23 May 2016 01:15:17 MSK.
44
// By http://git.io/cgogen. DO NOT EDIT.
55

66
package vulkan
@@ -10,6 +10,7 @@ package vulkan
1010
#include "vulkan/vulkan.h"
1111
#include "vulkan_wrapper.h"
1212
#include "vulkan_bridge.h"
13+
#include "android/native_window.h"
1314
#include <stdlib.h>
1415
#include "cgo_helpers.h"
1516
*/
@@ -1846,6 +1847,7 @@ type AndroidSurfaceCreateInfo struct {
18461847
SType StructureType
18471848
PNext unsafe.Pointer
18481849
Flags AndroidSurfaceCreateFlags
1850+
Window *ANativeWindow
18491851
refeca5c35c *C.VkAndroidSurfaceCreateInfoKHR
18501852
allocseca5c35c interface{}
18511853
}
@@ -1912,3 +1914,6 @@ type DebugMarkerMarkerInfo struct {
19121914
ref234b91fd *C.VkDebugMarkerMarkerInfoEXT
19131915
allocs234b91fd interface{}
19141916
}
1917+
1918+
// ANativeWindow as declared in android/native_window.h:36
1919+
type ANativeWindow C.ANativeWindow

0 commit comments

Comments
 (0)