Skip to content

Commit d0d0a0f

Browse files
committed
fix sample errors
1 parent bc04551 commit d0d0a0f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

sample/hello_compute/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class HelloApp : public App {
2323
.usage = ImageUsage::Storage,
2424
.extent = {Window::getWidth(), Window::getHeight(), 1},
2525
.format = vk::Format::eB8G8R8A8Unorm,
26+
.viewInfo = rv::ImageViewCreateInfo{},
2627
});
27-
image->createImageView();
2828

2929
buffer = context.createBuffer({
3030
.usage = BufferUsage::Uniform,

sample/hello_raytracing/main.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,26 @@ class HelloApp : public App {
3030
.vertexBuffer = mesh.vertexBuffer,
3131
.indexBuffer = mesh.indexBuffer,
3232
.vertexStride = sizeof(Vertex),
33-
.vertexCount = mesh.getVertexCount(),
33+
.maxVertexCount = mesh.getVertexCount(),
34+
.maxTriangleCount = mesh.getTriangleCount(),
3435
.triangleCount = mesh.getTriangleCount(),
36+
.debugName = "bottomAccel",
3537
});
3638
context.oneTimeSubmit([&](CommandBufferHandle commandBuffer) {
3739
commandBuffer->buildBottomAccel(bottomAccel);
3840
});
3941

4042
topAccel = context.createTopAccel({
4143
.accelInstances = {{bottomAccel}},
44+
.debugName = "topAccel",
4245
});
4346

4447
image = context.createImage({
4548
.usage = ImageUsage::Storage,
4649
.extent = {Window::getWidth(), Window::getHeight(), 1},
4750
.format = vk::Format::eB8G8R8A8Unorm,
51+
.viewInfo = rv::ImageViewCreateInfo{},
4852
});
49-
image->createImageView();
5053

5154
context.oneTimeSubmit([&](CommandBufferHandle commandBuffer) {
5255
commandBuffer->buildTopAccel(topAccel);

0 commit comments

Comments
 (0)