Skip to content

Commit 8e7ff36

Browse files
committed
added depth testing; added enums for image properties
1 parent adb4e01 commit 8e7ff36

File tree

13 files changed

+287
-78
lines changed

13 files changed

+287
-78
lines changed

jme3-core/src/main/java/com/jme3/renderer/vulkan/VulkanUtils.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,6 @@ public static LongBuffer accumulate(MemoryStack stack, Native<Long>... natives)
148148
return buf;
149149
}
150150

151-
public static int[] getTransferArguments(int srcLayout, int dstLayout) {
152-
// output array format: {srcAccessMask, dstAccessMask, srcStage, dstStage}
153-
if (srcLayout == VK_IMAGE_LAYOUT_UNDEFINED && dstLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
154-
return new int[] {0, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT};
155-
} else if (srcLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL && dstLayout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) {
156-
return new int[] {VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT,
157-
VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT};
158-
} else {
159-
throw new UnsupportedOperationException("Unsupported layer transitions.");
160-
}
161-
}
162-
163151
public static class NativeIterator <T> implements Iterable<T>, Iterator<T> {
164152

165153
private final PointerBuffer pointers;

jme3-examples/src/main/java/jme3test/vulkan/VulkanHelperTest.java

Lines changed: 68 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.jme3.math.Quaternion;
77
import com.jme3.math.Transform;
88
import com.jme3.math.Vector3f;
9+
import com.jme3.opencl.CommandQueue;
910
import com.jme3.renderer.vulkan.VulkanUtils;
1011
import com.jme3.shaderc.ShaderType;
1112
import com.jme3.shaderc.ShadercLoader;
@@ -62,15 +63,31 @@ public class VulkanHelperTest extends SimpleApplication implements SwapchainUpda
6263

6364
private VulkanLogger logger;
6465

66+
// mesh
6567
private final FloatBuffer vertexData = BufferUtils.createFloatBuffer(
66-
-0.5f, -0.5f, 1f, 0f, 0f, 1f, 0f,
67-
0.5f, -0.5f, 0f, 1f, 0f, 0f, 0f,
68-
0.5f, 0.5f, 0f, 0f, 1f, 0f, 1f,
69-
-0.5f, 0.5f, 1f, 1f, 1f, 1f, 1f);
70-
private final IntBuffer indexData = BufferUtils.createIntBuffer(0, 1, 2, 2, 3, 0);
68+
-0.5f, -0.5f, 0f, 1f, 0f, 0f, 1f, 0f,
69+
0.5f, -0.5f, 0f, 0f, 1f, 0f, 0f, 0f,
70+
0.5f, 0.5f, 0f, 0f, 0f, 1f, 0f, 1f,
71+
-0.5f, 0.5f, 0f, 1f, 1f, 1f, 1f, 1f,
72+
73+
-0.5f, -0.5f, -0.5f, 1f, 0f, 0f, 1f, 0f,
74+
0.5f, -0.5f, -0.5f, 0f, 1f, 0f, 0f, 0f,
75+
0.5f, 0.5f, -0.5f, 0f, 0f, 1f, 0f, 1f,
76+
-0.5f, 0.5f, -0.5f, 1f, 1f, 1f, 1f, 1f
77+
);
78+
private final IntBuffer indexData = BufferUtils.createIntBuffer(
79+
0, 1, 2, 2, 3, 0,
80+
4, 5, 6, 6, 7, 4);
81+
82+
// geometry
7183
private final Transform modelTransform = new Transform();
84+
85+
// material
7286
private Texture texture;
7387

88+
// framebuffer
89+
private ImageView depthView;
90+
7491
public static void main(String[] args) {
7592
VulkanHelperTest app = new VulkanHelperTest();
7693
AppSettings settings = new AppSettings(true);
@@ -145,6 +162,23 @@ public void simpleInitApp() {
145162
descriptorPool = new DescriptorPool(device, 2,
146163
PoolSize.uniformBuffers(2), PoolSize.combinedImageSamplers(2));
147164

165+
CommandPool transferPool = new CommandPool(device, queues.getGraphicsQueue(), true, false);
166+
167+
// depth texture
168+
Image.Format depthFormat = device.getPhysicalDevice().findSupportedFormat(
169+
VK_IMAGE_TILING_OPTIMAL,
170+
VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT,
171+
Image.Format.Depth32SFloat, Image.Format.Depth32SFloat_Stencil8UInt, Image.Format.Depth24UNorm_Stencil8UInt);
172+
GpuImage depthImage = new GpuImage(device, swapchain.getExtent().x, swapchain.getExtent().y, depthFormat,
173+
Image.Tiling.Optimal, new ImageUsageFlags().depthStencilAttachment(), new MemoryFlags().deviceLocal());
174+
depthView = depthImage.createView(VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_ASPECT_DEPTH_BIT, 0, 1, 0, 1);
175+
CommandBuffer commands = transferPool.allocateOneTimeCommandBuffer();
176+
commands.begin();
177+
depthImage.transitionLayout(commands, Image.Layout.Undefined, Image.Layout.DepthStencilAttachmentOptimal);
178+
commands.end();
179+
commands.submit(null, null, null);
180+
commands.getPool().getQueue().waitIdle();
181+
148182
// pipeline
149183
pipelineLayout = new PipelineLayout(device, descriptorLayout);
150184
vertModule = new ShaderModule(device, assetManager.loadAsset(ShadercLoader.key(
@@ -153,37 +187,48 @@ public void simpleInitApp() {
153187
"Shaders/VulkanFragTest.glsl", ShaderType.Fragment)), "main");
154188
try (RenderPassBuilder pass = new RenderPassBuilder()) {
155189
int color = pass.createAttachment(a -> a
156-
.format(swapchain.getFormat())
190+
.format(swapchain.getFormat().getVkEnum())
157191
.samples(VK_SAMPLE_COUNT_1_BIT)
158192
.loadOp(VK_ATTACHMENT_LOAD_OP_CLEAR)
159193
.storeOp(VK_ATTACHMENT_STORE_OP_STORE)
160194
.stencilLoadOp(VK_ATTACHMENT_LOAD_OP_DONT_CARE)
161195
.stencilStoreOp(VK_ATTACHMENT_STORE_OP_DONT_CARE)
162-
.initialLayout(VK_IMAGE_LAYOUT_UNDEFINED)
163-
.finalLayout(KHRSwapchain.VK_IMAGE_LAYOUT_PRESENT_SRC_KHR));
196+
.initialLayout(Image.Layout.Undefined.getVkEnum())
197+
.finalLayout(Image.Layout.PresentSrc.getVkEnum()));
198+
int depth = pass.createAttachment(a -> a
199+
.format(depthFormat.getVkEnum())
200+
.samples(VK_SAMPLE_COUNT_1_BIT)
201+
.loadOp(VK_ATTACHMENT_LOAD_OP_CLEAR)
202+
.storeOp(VK_ATTACHMENT_STORE_OP_DONT_CARE)
203+
.stencilLoadOp(VK_ATTACHMENT_LOAD_OP_DONT_CARE)
204+
.stencilStoreOp(VK_ATTACHMENT_STORE_OP_DONT_CARE)
205+
.initialLayout(Image.Layout.Undefined.getVkEnum())
206+
.finalLayout(Image.Layout.DepthStencilAttachmentOptimal.getVkEnum()));
164207
int subpass = pass.createSubpass(s -> {
165-
VkAttachmentReference.Buffer ref = VkAttachmentReference.calloc(1, pass.getStack())
208+
VkAttachmentReference.Buffer colorRef = VkAttachmentReference.calloc(1, pass.getStack())
166209
.attachment(color)
167-
.layout(VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL);
210+
.layout(Image.Layout.ColorAttachmentOptimal.getVkEnum());
211+
VkAttachmentReference depthRef = VkAttachmentReference.calloc(pass.getStack())
212+
.attachment(depth)
213+
.layout(Image.Layout.DepthStencilAttachmentOptimal.getVkEnum());
168214
s.pipelineBindPoint(VK_PIPELINE_BIND_POINT_GRAPHICS)
169215
.colorAttachmentCount(1)
170-
.pColorAttachments(ref);
216+
.pColorAttachments(colorRef)
217+
.pDepthStencilAttachment(depthRef);
171218
});
172219
pass.createDependency()
173220
.srcSubpass(VK_SUBPASS_EXTERNAL)
174221
.dstSubpass(subpass)
175-
.srcStageMask(VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT)
222+
.srcStageMask(VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT)
176223
.srcAccessMask(subpass)
177-
.dstStageMask(VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT)
178-
.dstAccessMask(VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT);
224+
.dstStageMask(VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT)
225+
.dstAccessMask(VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT);
179226
renderPass = pass.build(device);
180227
}
181-
swapchain.createFrameBuffers(renderPass);
228+
swapchain.createFrameBuffers(renderPass, depthView);
182229
pipeline = new GraphicsPipeline(device, pipelineLayout, renderPass, new RenderState(), vertModule, fragModule, new MeshDescription());
183230
graphicsPool = new CommandPool(device, queues.getGraphicsQueue(), false, true);
184231

185-
CommandPool transferPool = new CommandPool(device, queues.getGraphicsQueue(), true, false);
186-
187232
// vertex buffers
188233
try (MemoryStack stack = MemoryStack.stackPush()) {
189234
// cpu-accessible memory is not usually fast for the gpu to access, but
@@ -203,6 +248,7 @@ public void simpleInitApp() {
203248
indexBuffer.freeStagingBuffer();
204249
}
205250

251+
// material color texture
206252
GpuImage image = loadImage("Common/Textures/MissingTexture.png", transferPool);
207253
texture = new Texture(device, image.createView(VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1),
208254
VK_FILTER_LINEAR, VK_FILTER_LINEAR, VK_SAMPLER_ADDRESS_MODE_REPEAT, VK_SAMPLER_MIPMAP_MODE_LINEAR);
@@ -227,7 +273,7 @@ public boolean swapchainOutOfDate(Swapchain swapchain, int imageAcquireCode) {
227273
long window = ((LwjglVulkanContext)context).getWindowHandle();
228274
try (SimpleSwapchainSupport support = new SimpleSwapchainSupport(device.getPhysicalDevice(), surface, window)) {
229275
swapchain.reload(support);
230-
swapchain.createFrameBuffers(renderPass);
276+
swapchain.createFrameBuffers(renderPass, depthView);
231277
}
232278
return true;
233279
}
@@ -254,10 +300,11 @@ private GpuImage loadImage(String file, CommandPool transferPool) {
254300
new BufferUsageFlags().transferSrc(), new MemoryFlags().hostVisible().hostCoherent(), false);
255301
staging.copy(stack, data.getBuffer());
256302
GpuImage image = new GpuImage(device, data.getWidth(), data.getHeight(), data.getFormat(),
257-
new ImageUsageFlags().transferDst().sampled(), new MemoryFlags().deviceLocal());
303+
Image.Tiling.Optimal, new ImageUsageFlags().transferDst().sampled(),
304+
new MemoryFlags().deviceLocal());
258305
CommandBuffer commands = transferPool.allocateOneTimeCommandBuffer();
259306
commands.begin();
260-
image.transitionLayout(commands, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
307+
image.transitionLayout(commands, Image.Layout.Undefined, Image.Layout.TransferDstOptimal);
261308
VkBufferImageCopy.Buffer region = VkBufferImageCopy.calloc(1, stack)
262309
.bufferOffset(0)
263310
.bufferRowLength(0) // padding bytes
@@ -270,7 +317,7 @@ private GpuImage loadImage(String file, CommandPool transferPool) {
270317
region.imageExtent().set(data.getWidth(), data.getHeight(), 1);
271318
vkCmdCopyBufferToImage(commands.getBuffer(), staging.getNativeObject(),
272319
image.getNativeObject(), VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, region);
273-
image.transitionLayout(commands, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
320+
image.transitionLayout(commands, Image.Layout.TransferDstOptimal, Image.Layout.ShaderReadOnlyOptimal);
274321
commands.end();
275322
commands.submit(null, null, null);
276323
transferPool.getQueue().waitIdle();

jme3-lwjgl3/src/main/java/com/jme3/vulkan/GraphicsPipeline.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ public GraphicsPipeline(LogicalDevice device, PipelineLayout layout, RenderPass
5353
.sType(VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO)
5454
.pViewports(viewport)
5555
.pScissors(scissor);
56+
VkPipelineDepthStencilStateCreateInfo depthStencil = VkPipelineDepthStencilStateCreateInfo.calloc(stack)
57+
.sType(VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO)
58+
.depthTestEnable(state.isDepthTest())
59+
.depthWriteEnable(state.isDepthWrite())
60+
.depthCompareOp(RenderStateToVulkan.depthFunc(state.getDepthFunc()))
61+
.depthBoundsTestEnable(false)
62+
.stencilTestEnable(false);
5663
VkPipelineRasterizationStateCreateInfo raster = VkPipelineRasterizationStateCreateInfo.calloc(stack)
5764
.sType(VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO)
5865
.depthClampEnable(false)
@@ -89,6 +96,7 @@ public GraphicsPipeline(LogicalDevice device, PipelineLayout layout, RenderPass
8996
.pVertexInputState(vertInput)
9097
.pInputAssemblyState(assembly)
9198
.pViewportState(vpState)
99+
.pDepthStencilState(depthStencil)
92100
.pRasterizationState(raster)
93101
.pMultisampleState(multisample)
94102
.pColorBlendState(blend)

jme3-lwjgl3/src/main/java/com/jme3/vulkan/MeshDescription.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ public MeshDescription() {
1717
// for each vertex buffer on the mesh
1818
bindings = VkVertexInputBindingDescription.calloc(1)
1919
.binding(0)
20-
.stride(Float.BYTES * 7) // bytes per vertex
20+
.stride(Float.BYTES * 8) // bytes per vertex
2121
.inputRate(VK_VERTEX_INPUT_RATE_VERTEX);
2222
// for each attribute in each vertex buffer
2323
attributes = VkVertexInputAttributeDescription.calloc(3);
2424
attributes.get(0).binding(0)
2525
.location(0)
26-
.format(VK_FORMAT_R32G32_SFLOAT)
26+
.format(VK_FORMAT_R32G32B32_SFLOAT)
2727
.offset(0);
2828
attributes.get(1).binding(0)
2929
.location(1)
3030
.format(VK_FORMAT_R32G32B32_SFLOAT)
31-
.offset(Float.BYTES * 2);
31+
.offset(Float.BYTES * 3);
3232
attributes.get(2).binding(0)
3333
.location(2)
3434
.format(VK_FORMAT_R32G32_SFLOAT)
35-
.offset(Float.BYTES * 5);
35+
.offset(Float.BYTES * 6);
3636
ref = Native.get().register(this);
3737
}
3838

jme3-lwjgl3/src/main/java/com/jme3/vulkan/PhysicalDevice.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.jme3.vulkan;
22

3+
import com.jme3.vulkan.images.Image;
34
import org.lwjgl.PointerBuffer;
45
import org.lwjgl.system.MemoryStack;
56
import org.lwjgl.vulkan.*;
@@ -92,10 +93,10 @@ public int findMemoryType(MemoryStack stack, int types, int flags) {
9293
throw new NullPointerException("Suitable memory type not found.");
9394
}
9495

95-
public int findSupportedFormat(int tiling, int features, int... candidates) {
96+
public Image.Format findSupportedFormat(int tiling, int features, Image.Format... candidates) {
9697
VkFormatProperties props = VkFormatProperties.create();
97-
for (int f : candidates) {
98-
vkGetPhysicalDeviceFormatProperties(device, f, props);
98+
for (Image.Format f : candidates) {
99+
vkGetPhysicalDeviceFormatProperties(device, f.getVkEnum(), props);
99100
if ((tiling == VK_IMAGE_TILING_LINEAR && (props.linearTilingFeatures() & features) == features)
100101
|| (tiling == VK_IMAGE_TILING_OPTIMAL && (props.optimalTilingFeatures() & features) == features)) {
101102
return f;

jme3-lwjgl3/src/main/java/com/jme3/vulkan/RenderPass.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ public NativeReference getNativeReference() {
5353

5454
public void begin(CommandBuffer cmd, FrameBuffer fbo) {
5555
try (MemoryStack stack = MemoryStack.stackPush()) {
56-
VkClearValue.Buffer clear = VkClearValue.calloc(1, stack);
57-
clear.color().float32(stack.floats(0f, 0f, 0f, 1f));
56+
VkClearValue.Buffer clear = VkClearValue.calloc(2, stack);
57+
clear.get(0).color().float32(stack.floats(0f, 0f, 0f, 1f));
58+
clear.get(1).depthStencil().set(1.0f, 0);
5859
VkRenderPassBeginInfo begin = VkRenderPassBeginInfo.calloc(stack)
5960
.sType(VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO)
6061
.renderPass(id)

jme3-lwjgl3/src/main/java/com/jme3/vulkan/RenderStateToVulkan.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ private static RuntimeException unrecognized(Object state) {
99
return new UnsupportedOperationException("Unrecognized: " + state);
1010
}
1111

12+
public static int depthFunc(TestFunction func) {
13+
switch (func) {
14+
case Always: return VK_COMPARE_OP_ALWAYS;
15+
case Equal: return VK_COMPARE_OP_EQUAL;
16+
case Greater: return VK_COMPARE_OP_GREATER;
17+
case Less: return VK_COMPARE_OP_LESS;
18+
case LessOrEqual: return VK_COMPARE_OP_LESS_OR_EQUAL;
19+
case GreaterOrEqual: return VK_COMPARE_OP_GREATER_OR_EQUAL;
20+
case Never: return VK_COMPARE_OP_NEVER;
21+
case NotEqual: return VK_COMPARE_OP_NOT_EQUAL;
22+
default: throw unrecognized(func);
23+
}
24+
}
25+
1226
public static int blendEquation(BlendEquation eq) {
1327
switch (eq) {
1428
case Add: return VK_BLEND_OP_ADD;

jme3-lwjgl3/src/main/java/com/jme3/vulkan/Swapchain.java

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class Swapchain implements Native<Long> {
2323
private final List<SwapchainImage> images = new ArrayList<>();
2424
private SwapchainUpdater updater;
2525
private Extent2 extent;
26-
private int format;
26+
private Image.Format format;
2727
private long id = VK_NULL_HANDLE;
2828

2929
public Swapchain(LogicalDevice device, Surface surface, SwapchainSupport support) {
@@ -65,14 +65,14 @@ public void reload(SwapchainSupport support) {
6565
KHRSurface.vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
6666
device.getPhysicalDevice().getDevice(), surface.getNativeObject(), caps);
6767
VkSurfaceFormatKHR fmt = support.selectFormat();
68-
format = fmt.format();
68+
format = Image.Format.vkEnum(fmt.format());
6969
VkExtent2D ext = support.selectExtent();
7070
extent = new Extent2(ext);
7171
VkSwapchainCreateInfoKHR create = VkSwapchainCreateInfoKHR.calloc(stack)
7272
.sType(KHRSwapchain.VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
7373
.surface(surface.getNativeObject())
7474
.minImageCount(support.selectImageCount())
75-
.imageFormat(format)
75+
.imageFormat(format.getVkEnum())
7676
.imageColorSpace(fmt.colorSpace())
7777
.imageExtent(ext)
7878
.imageArrayLayers(1)
@@ -106,9 +106,9 @@ public void reload(SwapchainSupport support) {
106106
ref.refresh(); // refresh the native destroyer
107107
}
108108

109-
public void createFrameBuffers(RenderPass compat) {
109+
public void createFrameBuffers(RenderPass compat, ImageView depthStencil) {
110110
for (SwapchainImage img : images) {
111-
img.createFrameBuffer(compat);
111+
img.createFrameBuffer(compat, depthStencil);
112112
}
113113
}
114114

@@ -154,7 +154,7 @@ public Extent2 getExtent() {
154154
return extent;
155155
}
156156

157-
public int getFormat() {
157+
public Image.Format getFormat() {
158158
return format;
159159
}
160160

@@ -205,10 +205,15 @@ public int getDepth() {
205205
}
206206

207207
@Override
208-
public int getFormat() {
208+
public Image.Format getFormat() {
209209
return format;
210210
}
211211

212+
@Override
213+
public Image.Tiling getTiling() {
214+
return Tiling.Optimal;
215+
}
216+
212217
@Override
213218
public Long getNativeObject() {
214219
return id;
@@ -227,8 +232,8 @@ public NativeReference getNativeReference() {
227232
return ref;
228233
}
229234

230-
public void createFrameBuffer(RenderPass compat) {
231-
this.frameBuffer = new FrameBuffer(getDevice(), compat, extent.x, extent.y, 1, view);
235+
public void createFrameBuffer(RenderPass compat, ImageView depthStencil) {
236+
this.frameBuffer = new FrameBuffer(getDevice(), compat, extent.x, extent.y, 1, view, depthStencil);
232237
}
233238

234239
public FrameBuffer getFrameBuffer() {

jme3-lwjgl3/src/main/java/com/jme3/vulkan/flags/ImageUsageFlags.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ public ImageUsageFlags sampled() {
2121
return this;
2222
}
2323

24+
public ImageUsageFlags depthStencilAttachment() {
25+
usageFlags |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
26+
return this;
27+
}
28+
2429
public int getUsageFlags() {
2530
return usageFlags;
2631
}

0 commit comments

Comments
 (0)