diff options
| author | Yong He <yonghe@outlook.com> | 2021-04-24 00:17:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-24 00:17:43 -0700 |
| commit | 9a5672d7b8a155117a2c3f8375e3b8a5b43d91b7 (patch) | |
| tree | 9be3ea214ea735e41e8fdaef9824e84212a30cbb /examples/shader-toy/main.cpp | |
| parent | 697017e6fae8c252638abc298ec1556de2e41314 (diff) | |
Remove resource `Usage` from `gfx` interface. (#1813)
* Fix `model-viewer` crash when using Vulkan.
Fixing an issue in shader object layout creation for to make sure a correct descriptor set layout is calculated for types that need an implicit constant buffer.
* Fix formatting.
* Fixes.
* Fix memory leak in vulkan.
* Remove resource `Usage` from `gfx` interface.
Diffstat (limited to 'examples/shader-toy/main.cpp')
| -rw-r--r-- | examples/shader-toy/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/shader-toy/main.cpp b/examples/shader-toy/main.cpp index d94d629ba..c41bd71ca 100644 --- a/examples/shader-toy/main.cpp +++ b/examples/shader-toy/main.cpp @@ -290,10 +290,10 @@ Result initialize() if(!inputLayout) return SLANG_FAIL; IBufferResource::Desc vertexBufferDesc; - vertexBufferDesc.init(FullScreenTriangle::kVertexCount * sizeof(FullScreenTriangle::Vertex)); - vertexBufferDesc.setDefaults(IResource::Usage::VertexBuffer); + vertexBufferDesc.type = IResource::Type::Buffer; + vertexBufferDesc.sizeInBytes = FullScreenTriangle::kVertexCount * sizeof(FullScreenTriangle::Vertex); + vertexBufferDesc.defaultState = ResourceState::VertexBuffer; gVertexBuffer = gDevice->createBufferResource( - IResource::Usage::VertexBuffer, vertexBufferDesc, &FullScreenTriangle::kVertices[0]); if(!gVertexBuffer) return SLANG_FAIL; |
