Skip to content

Commit 80ba751

Browse files
committed
fixed big pointer mistake.. sorry
1 parent 4dabd96 commit 80ba751

File tree

12 files changed

+90
-68
lines changed

12 files changed

+90
-68
lines changed

src/main/kotlin/vkk/_10/api/CommandBuffer_vk10.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ interface CommandBuffer_vk10 : Pointer {
3131
// --- [ vkCmdBeginRenderPass ] ---
3232

3333
fun MemoryStack.beginRenderPass(renderPassBegin: RenderPassBeginInfo, contents: VkSubpassContents = VkSubpassContents.INLINE) =
34-
framed { callPPV(adr, renderPassBegin write this, contents.i, capabilities.vkCmdBeginRenderPass) }
34+
framed { callPPV(this@CommandBuffer_vk10.adr, renderPassBegin write this, contents.i, capabilities.vkCmdBeginRenderPass) }
3535

3636
fun beginRenderPass(renderPassBegin: RenderPassBeginInfo, contents: VkSubpassContents = VkSubpassContents.INLINE) =
3737
stak { it.beginRenderPass(renderPassBegin, contents) }

src/main/kotlin/vkk/_10/api/Device_vk10.kt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -225,55 +225,55 @@ interface Device_vk10 : Pointer {
225225
// --- [ vkCreatePipelineCache ] ---
226226

227227
fun MemoryStack.createPipelineCache(createInfo: PipelineCacheCreateInfo = PipelineCacheCreateInfo()): VkPipelineCache =
228-
framed { VkPipelineCache(this.longAdr { callPPPPI(adr, createInfo write this, NULL, it, capabilities.vkCreatePipelineCache) }) }
228+
framed { VkPipelineCache(this.longAdr { callPPPPI(this@Device_vk10.adr, createInfo write this, NULL, it, capabilities.vkCreatePipelineCache) }) }
229229

230230
fun createPipelineCache(createInfo: PipelineCacheCreateInfo = PipelineCacheCreateInfo()): VkPipelineCache =
231231
stak { it.createPipelineCache(createInfo) }
232232

233233
// --- [ vkCreatePipelineLayout ] ---
234234

235235
infix fun MemoryStack.createPipelineLayout(createInfo: PipelineLayoutCreateInfo): VkPipelineLayout =
236-
framed { VkPipelineLayout(this.longAdr { callPPPPI(adr, createInfo write this, NULL, it, capabilities.vkCreatePipelineLayout) }) }
236+
framed { VkPipelineLayout(this.longAdr { callPPPPI(this@Device_vk10.adr, createInfo write this, NULL, it, capabilities.vkCreatePipelineLayout) }) }
237237

238238
infix fun createPipelineLayout(createInfo: PipelineLayoutCreateInfo): VkPipelineLayout =
239239
stak { it createPipelineLayout createInfo }
240240

241241
// --- [ vkCreateQueryPool ] ---
242242

243243
infix fun MemoryStack.createQueryPool(createInfo: QueryPoolCreateInfo): VkQueryPool =
244-
framed { VkQueryPool(this.longAdr { callPPPPI(adr, createInfo write this, NULL, it, capabilities.vkCreateQueryPool) }) }
244+
framed { VkQueryPool(this.longAdr { callPPPPI(this@Device_vk10.adr, createInfo write this, NULL, it, capabilities.vkCreateQueryPool) }) }
245245

246246
infix fun createQueryPool(createInfo: QueryPoolCreateInfo): VkQueryPool =
247247
stak { it createQueryPool createInfo }
248248

249249
// --- [ vkCreateRenderPass ] ---
250250

251251
infix fun MemoryStack.createRenderPass(createInfo: RenderPassCreateInfo): VkRenderPass =
252-
framed { VkRenderPass(this.longAdr { callPPPPI(adr, createInfo write this, NULL, it, capabilities.vkCreateRenderPass) }) }
252+
framed { VkRenderPass(this.longAdr { callPPPPI(this@Device_vk10.adr, createInfo write this, NULL, it, capabilities.vkCreateRenderPass) }) }
253253

254254
infix fun createRenderPass(createInfo: RenderPassCreateInfo): VkRenderPass =
255255
stak { it createRenderPass createInfo }
256256

257257
// --- [ vkCreateSampler ] ---
258258

259259
infix fun MemoryStack.createSampler(createInfo: SamplerCreateInfo): VkSampler =
260-
framed { VkSampler(this.longAdr { callPPPPI(adr, createInfo write this, NULL, it, capabilities.vkCreateSampler) }) }
260+
framed { VkSampler(this.longAdr { callPPPPI(this@Device_vk10.adr, createInfo write this, NULL, it, capabilities.vkCreateSampler) }) }
261261

262262
infix fun createSampler(createInfo: SamplerCreateInfo): VkSampler =
263263
stak { it createSampler createInfo }
264264

265265
// --- [ vkCreateSemaphore ] ---
266266

267267
fun MemoryStack.createSemaphore(createInfo: SemaphoreCreateInfo = SemaphoreCreateInfo()): VkSemaphore =
268-
framed { VkSemaphore(this.longAdr { callPPPPI(adr, createInfo write this, NULL, it, capabilities.vkCreateSemaphore) }) }
268+
framed { VkSemaphore(this.longAdr { callPPPPI(this@Device_vk10.adr, createInfo write this, NULL, it, capabilities.vkCreateSemaphore) }) }
269269

270270
fun createSemaphore(createInfo: SemaphoreCreateInfo = SemaphoreCreateInfo()): VkSemaphore =
271271
stak { it.createSemaphore(createInfo) }
272272

273273
// --- [ vkCreateShaderModule ] ---
274274

275275
infix fun MemoryStack.createShaderModule(createInfo: ShaderModuleCreateInfo): VkShaderModule =
276-
framed { VkShaderModule(this.longAdr { callPPPPI(adr, createInfo write this, NULL, it, capabilities.vkCreateShaderModule) }) }
276+
framed { VkShaderModule(this.longAdr { callPPPPI(this@Device_vk10.adr, createInfo write this, NULL, it, capabilities.vkCreateShaderModule) }) }
277277

278278
infix fun createShaderModule(createInfo: ShaderModuleCreateInfo): VkShaderModule =
279279
stak { it createShaderModule createInfo }
@@ -395,7 +395,7 @@ interface Device_vk10 : Pointer {
395395
// --- [ vkGetBufferMemoryRequirements ] ---
396396

397397
infix fun MemoryStack.getBufferMemoryRequirements(buffer: VkBuffer): MemoryRequirements =
398-
framed { MemoryRequirements.read(this) { callPJPV(adr, buffer.L, it, capabilities.vkGetBufferMemoryRequirements) } }
398+
framed { MemoryRequirements.read(this) { callPJPV(this@Device_vk10.adr, buffer.L, it, capabilities.vkGetBufferMemoryRequirements) } }
399399

400400
infix fun getBufferMemoryRequirements(buffer: VkBuffer): MemoryRequirements =
401401
stak { it getBufferMemoryRequirements buffer }
@@ -411,7 +411,7 @@ interface Device_vk10 : Pointer {
411411
// --- [ vkGetRenderAreaGranularity ] ---
412412

413413
infix fun MemoryStack.getRenderAreaGranularity(renderPass: VkRenderPass): Extent2D =
414-
framed { Extent2D.read(this) { callPJPV(adr, renderPass.L, it, capabilities.vkGetRenderAreaGranularity) } }
414+
framed { Extent2D.read(this) { callPJPV(this@Device_vk10.adr, renderPass.L, it, capabilities.vkGetRenderAreaGranularity) } }
415415

416416
infix fun getRenderAreaGranularity(renderPass: VkRenderPass): Extent2D =
417417
stak { it getRenderAreaGranularity renderPass }
@@ -434,7 +434,7 @@ interface Device_vk10 : Pointer {
434434
// --- [ vkGetImageMemoryRequirements ] ---
435435

436436
infix fun MemoryStack.getImageMemoryRequirements(image: VkImage): MemoryRequirements =
437-
framed { MemoryRequirements.read(this) { callPJPV(adr, image.L, it, capabilities.vkGetImageMemoryRequirements) } }
437+
framed { MemoryRequirements.read(this) { callPJPV(this@Device_vk10.adr, image.L, it, capabilities.vkGetImageMemoryRequirements) } }
438438

439439
infix fun getImageMemoryRequirements(image: VkImage): MemoryRequirements =
440440
stak { it getImageMemoryRequirements image }
@@ -459,7 +459,7 @@ interface Device_vk10 : Pointer {
459459
// --- [ vkGetImageSubresourceLayout ] ---
460460

461461
fun MemoryStack.getImageSubresourceLayout(image: VkImage, subresource: ImageSubresource): SubresourceLayout =
462-
framed { SubresourceLayout.read(this) { callPJPPV(adr, image.L, subresource write this, it, capabilities.vkGetImageSubresourceLayout) } }
462+
framed { SubresourceLayout.read(this) { callPJPPV(this@Device_vk10.adr, image.L, subresource write this, it, capabilities.vkGetImageSubresourceLayout) } }
463463

464464
fun getImageSubresourceLayout(image: VkImage, subresource: ImageSubresource): SubresourceLayout =
465465
stak { it.getImageSubresourceLayout(image, subresource) }
@@ -508,23 +508,23 @@ interface Device_vk10 : Pointer {
508508
// --- [ vkGetDeviceMemoryCommitment ] ---
509509

510510
infix fun MemoryStack.getMemoryCommitment(memory: VkDeviceMemory): VkDeviceSize =
511-
framed { VkDeviceSize(this.longAdr { callPJPV(adr, memory.L, it, capabilities.vkGetDeviceMemoryCommitment) }) }
511+
framed { VkDeviceSize(this.longAdr { callPJPV(this@Device_vk10.adr, memory.L, it, capabilities.vkGetDeviceMemoryCommitment) }) }
512512

513513
infix fun getMemoryCommitment(memory: VkDeviceMemory): VkDeviceSize =
514514
stak { it getMemoryCommitment memory }
515515

516516
// --- [ vkMapMemory ] ---
517517

518518
fun MemoryStack.mapMemory(memory: VkDeviceMemory, offset: VkDeviceSize, size: VkDeviceSize, flags: VkMemoryMapFlags = 0): Ptr =
519-
framed { this.pointerAdr { callPJJJPI(adr, memory.L, offset.L, size.L, flags, it, capabilities.vkMapMemory) } }
519+
framed { this.pointerAdr { callPJJJPI(this@Device_vk10.adr, memory.L, offset.L, size.L, flags, it, capabilities.vkMapMemory) } }
520520

521521
fun mapMemory(memory: VkDeviceMemory, offset: VkDeviceSize, size: VkDeviceSize, flags: VkMemoryMapFlags = 0): Ptr =
522522
stak { it.mapMemory(memory, offset, size, flags) }
523523

524524
// --- [ vkMergePipelineCaches ] ---
525525

526526
fun MemoryStack.mergePipelineCaches(dstCache: VkPipelineCache, srcCaches: VkPipelineCache_Array): VkResult =
527-
framed { VkResult(callPJPI(adr, dstCache.L, srcCaches.size, srcCaches write this, capabilities.vkMergePipelineCaches)) }
527+
framed { VkResult(callPJPI(this@Device_vk10.adr, dstCache.L, srcCaches.size, srcCaches write this, capabilities.vkMergePipelineCaches)) }
528528

529529
fun mergePipelineCaches(dstCache: VkPipelineCache, srcCaches: VkPipelineCache_Array): VkResult =
530530
stak { it.mergePipelineCaches(dstCache, srcCaches) }
@@ -544,14 +544,14 @@ interface Device_vk10 : Pointer {
544544
// --- [ vkResetFences ] ---
545545

546546
infix fun MemoryStack.resetFences(fences: VkFence_Array): VkResult =
547-
framed { VkResult(callPPI(adr, fences.size, fences write this, capabilities.vkResetFences)) }
547+
framed { VkResult(callPPI(this@Device_vk10.adr, fences.size, fences write this, capabilities.vkResetFences)) }
548548

549549
infix fun resetFences(fences: VkFence_Array): VkResult =
550550
stak { it resetFences fences }
551551

552552

553553
infix fun MemoryStack.resetFences(fence: VkFence): VkResult =
554-
framed { VkResult(callPPI(adr, 1, this.longAdr(fence.L), capabilities.vkResetFences)) }
554+
framed { VkResult(callPPI(this@Device_vk10.adr, 1, this.longAdr(fence.L), capabilities.vkResetFences)) }
555555

556556
infix fun resetFences(fence: VkFence): VkResult =
557557
stak { it resetFences fence }

src/main/kotlin/vkk/_10/api/Instance_vk10.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface Instance_vk10 : Pointer {
2424
// --- [ vkCreateDebugReportCallbackEXT ] ---
2525

2626
infix fun MemoryStack.createDebugReportCallbackEXT(createInfo: DebugReportCallbackCreateInfo): VkDebugReportCallback =
27-
framed { VkDebugReportCallback(this.longAdr { VK_CHECK_RESULT(callPPPPI(adr, createInfo write this, NULL, it, capabilities.vkCreateDebugReportCallbackEXT)) }) }
27+
framed { VkDebugReportCallback(this.longAdr { VK_CHECK_RESULT(callPPPPI(this@Instance_vk10.adr, createInfo write this, NULL, it, capabilities.vkCreateDebugReportCallbackEXT)) }) }
2828

2929
infix fun createDebugReportCallbackEXT(createInfo: DebugReportCallbackCreateInfo): VkDebugReportCallback =
3030
stak { it createDebugReportCallbackEXT createInfo }

src/main/kotlin/vkk/_10/api/PhysicalDevice_vk10.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,31 +68,31 @@ interface PhysicalDevice_vk10 : Pointer {
6868
// --- [ vkGetPhysicalDeviceFeatures ] ---
6969

7070
val MemoryStack.features: PhysicalDeviceFeatures
71-
get() = PhysicalDeviceFeatures.read(this) { callPPV(adr, it, capabilities.vkGetPhysicalDeviceFeatures) }
71+
get() = PhysicalDeviceFeatures.read(this) { callPPV(this@PhysicalDevice_vk10.adr, it, capabilities.vkGetPhysicalDeviceFeatures) }
7272

7373
val features: PhysicalDeviceFeatures
7474
get() = stak { it.features }
7575

7676
// --- [ vkGetPhysicalDeviceFormatProperties ] ---
7777

7878
infix fun MemoryStack.getFormatProperties(format: VkFormat): FormatProperties =
79-
framed { FormatProperties.read(this) { callPPV(adr, format.i, it, capabilities.vkGetPhysicalDeviceFormatProperties) } }
79+
framed { FormatProperties.read(this) { callPPV(this@PhysicalDevice_vk10.adr, format.i, it, capabilities.vkGetPhysicalDeviceFormatProperties) } }
8080

8181
infix fun getFormatProperties(format: VkFormat): FormatProperties =
8282
stak { it getFormatProperties format }
8383

8484
// --- [ vkGetPhysicalDeviceImageFormatProperties ] ---
8585

8686
fun MemoryStack.getImageFormatProperties(format: VkFormat, type: VkImageType, tiling: VkImageTiling, usage: VkImageUsageFlags, flags: VkImageCreateFlags): ImageFormatProperties =
87-
framed { ImageFormatProperties.read(this) { VK_CHECK_RESULT(callPPI(adr, format.i, type.i, tiling.i, usage, flags, it, capabilities.vkGetPhysicalDeviceImageFormatProperties)) } }
87+
framed { ImageFormatProperties.read(this) { VK_CHECK_RESULT(callPPI(this@PhysicalDevice_vk10.adr, format.i, type.i, tiling.i, usage, flags, it, capabilities.vkGetPhysicalDeviceImageFormatProperties)) } }
8888

8989
fun getImageFormatProperties(format: VkFormat, type: VkImageType, tiling: VkImageTiling, usage: VkImageUsageFlags, flags: VkImageCreateFlags): ImageFormatProperties =
9090
stak { it.getImageFormatProperties(format, type, tiling, usage, flags) }
9191

9292
// --- [ vkGetPhysicalDeviceProperties ] ---
9393

9494
val MemoryStack.properties: PhysicalDeviceProperties
95-
get() = framed { PhysicalDeviceProperties.read(this) { callPPV(adr, it, capabilities.vkGetPhysicalDeviceProperties) } }
95+
get() = framed { PhysicalDeviceProperties.read(this) { callPPV(this@PhysicalDevice_vk10.adr, it, capabilities.vkGetPhysicalDeviceProperties) } }
9696

9797
val properties: PhysicalDeviceProperties
9898
get() = stak { it.properties }
@@ -117,7 +117,7 @@ interface PhysicalDevice_vk10 : Pointer {
117117
// --- [ vkGetPhysicalDeviceMemoryProperties ] ---
118118

119119
val MemoryStack.memoryProperties: PhysicalDeviceMemoryProperties
120-
get() = framed { PhysicalDeviceMemoryProperties.read(this) { callPPV(adr, it, capabilities.vkGetPhysicalDeviceMemoryProperties) } }
120+
get() = framed { PhysicalDeviceMemoryProperties.read(this) { callPPV(this@PhysicalDevice_vk10.adr, it, capabilities.vkGetPhysicalDeviceMemoryProperties) } }
121121

122122
val memoryProperties: PhysicalDeviceMemoryProperties
123123
get() = stak { it.memoryProperties }

src/main/kotlin/vkk/_10/api/Queue_vk10.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ interface Queue_vk10 : Pointer {
2121
// --- [ vkQueueBindSparse ] ---
2222

2323
fun MemoryStack.bindSparse(bindInfos: Array<BindSparseInfo>, fence: VkFence = VkFence.NULL): VkResult =
24-
framed { VkResult(callPPJI(adr, bindInfos.size, bindInfos write this, fence.L, capabilities.vkQueueBindSparse)) }
24+
framed { VkResult(callPPJI(this@Queue_vk10.adr, bindInfos.size, bindInfos write this, fence.L, capabilities.vkQueueBindSparse)) }
2525

2626
fun bindSparse(bindInfos: Array<BindSparseInfo>, fence: VkFence = VkFence.NULL): VkResult =
2727
stak { it.bindSparse(bindInfos, fence) }
2828

2929
// --- [ vkQueueSubmit ] ---
3030

3131
fun MemoryStack.submit(submit: SubmitInfo, fence: VkFence = VkFence.NULL): VkResult =
32-
framed { VkResult(callPPJI(adr, 1, submit write this, fence.L, capabilities.vkQueueSubmit)).andCheck() }
32+
framed { VkResult(callPPJI(this@Queue_vk10.adr, 1, submit write this, fence.L, capabilities.vkQueueSubmit)).andCheck() }
3333

3434
fun submit(submit: SubmitInfo, fence: VkFence = VkFence.NULL): VkResult =
3535
stak { it.submit(submit, fence) }

src/main/kotlin/vkk/_11/api/Device_vk11.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ interface Device_vk11 : Pointer {
5252
// --- [ vkCreateDescriptorUpdateTemplate ] ---
5353

5454
infix fun MemoryStack.createDescriptorUpdateTemplate(createInfo: DescriptorUpdateTemplateCreateInfo): VkDescriptorUpdateTemplate =
55-
framed { VkDescriptorUpdateTemplate(this.longAdr { callPPPPI(adr, createInfo write this, NULL, it, capabilities.vkCreateDescriptorUpdateTemplate) }) }
55+
framed { VkDescriptorUpdateTemplate(this.longAdr { callPPPPI(this@Device_vk11.adr, createInfo write this, NULL, it, capabilities.vkCreateDescriptorUpdateTemplate) }) }
5656

5757
infix fun createDescriptorUpdateTemplate(createInfo: DescriptorUpdateTemplateCreateInfo): VkDescriptorUpdateTemplate =
5858
stak { it createDescriptorUpdateTemplate createInfo }
5959

6060
// --- [ vkCreateSamplerYcbcrConversion ] ---
6161

6262
infix fun MemoryStack.createSamplerYcbcrConversion(createInfo: SamplerYcbcrConversionCreateInfo): VkSamplerYcbcrConversion =
63-
framed { VkSamplerYcbcrConversion(this.longAdr { callPPPPI(adr, createInfo write this, NULL, it, capabilities.vkCreateSamplerYcbcrConversion) }) }
63+
framed { VkSamplerYcbcrConversion(this.longAdr { callPPPPI(this@Device_vk11.adr, createInfo write this, NULL, it, capabilities.vkCreateSamplerYcbcrConversion) }) }
6464

6565
infix fun createSamplerYcbcrConversion(createInfo: SamplerYcbcrConversionCreateInfo): VkSamplerYcbcrConversion =
6666
stak { it createSamplerYcbcrConversion createInfo }
@@ -76,31 +76,31 @@ interface Device_vk11 : Pointer {
7676
// --- [ vkGetDescriptorSetLayoutSupport ] ---
7777

7878
infix fun MemoryStack.getDescriptorSetLayoutSupport(createInfo: DescriptorSetLayoutCreateInfo): DescriptorSetLayoutSupport =
79-
framed { DescriptorSetLayoutSupport.read(this) { callPPPV(adr, createInfo write this, it, capabilities.vkGetDescriptorSetLayoutSupport) } }
79+
framed { DescriptorSetLayoutSupport.read(this) { callPPPV(this@Device_vk11.adr, createInfo write this, it, capabilities.vkGetDescriptorSetLayoutSupport) } }
8080

8181
infix fun getDescriptorSetLayoutSupport(createInfo: DescriptorSetLayoutCreateInfo): DescriptorSetLayoutSupport =
8282
stak { it getDescriptorSetLayoutSupport createInfo }
8383

8484
// --- [ vkGetDeviceGroupPeerMemoryFeatures ] ---
8585

8686
fun MemoryStack.getGroupPeerMemoryFeatures(heapIndex: Int, localDeviceIndex: Int, remoteDeviceIndex: Int): VkPeerMemoryFeatureFlags =
87-
framed { this.intAdr { callPPV(adr, heapIndex, localDeviceIndex, remoteDeviceIndex, it, capabilities.vkGetDeviceGroupPeerMemoryFeatures) } }
87+
framed { this.intAdr { callPPV(this@Device_vk11.adr, heapIndex, localDeviceIndex, remoteDeviceIndex, it, capabilities.vkGetDeviceGroupPeerMemoryFeatures) } }
8888

8989
fun getGroupPeerMemoryFeatures(heapIndex: Int, localDeviceIndex: Int, remoteDeviceIndex: Int): VkPeerMemoryFeatureFlags =
9090
stak { it.getGroupPeerMemoryFeatures(heapIndex, localDeviceIndex, remoteDeviceIndex) }
9191

9292
// --- [ vkGetImageMemoryRequirements2 ] ---
9393

9494
infix fun MemoryStack.getImageMemoryRequirements2(info: ImageMemoryRequirementsInfo2): MemoryRequirements2 =
95-
framed { MemoryRequirements2.read(this) { callPPPV(adr, info write this, it, capabilities.vkGetImageMemoryRequirements2) } }
95+
framed { MemoryRequirements2.read(this) { callPPPV(this@Device_vk11.adr, info write this, it, capabilities.vkGetImageMemoryRequirements2) } }
9696

9797
infix fun getImageMemoryRequirements2(info: ImageMemoryRequirementsInfo2): MemoryRequirements2 =
9898
stak { it getImageMemoryRequirements2 info }
9999

100100
// --- [ vkGetBufferMemoryRequirements2 ] ---
101101

102102
infix fun MemoryStack.getBufferMemoryRequirements2(info: BufferMemoryRequirementsInfo2): MemoryRequirements2 =
103-
framed { MemoryRequirements2.read(this) { callPPPV(adr, info write this, it, capabilities.vkGetBufferMemoryRequirements2) } }
103+
framed { MemoryRequirements2.read(this) { callPPPV(this@Device_vk11.adr, info write this, it, capabilities.vkGetBufferMemoryRequirements2) } }
104104

105105
infix fun getBufferMemoryRequirements2(info: BufferMemoryRequirementsInfo2): MemoryRequirements2 =
106106
stak { it getBufferMemoryRequirements2 info }

0 commit comments

Comments
 (0)