diff options
| author | Yong He <yonghe@outlook.com> | 2021-03-25 09:41:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-25 09:41:53 -0700 |
| commit | e050035e0b7d3f257a46bc1cb644163026cb1b23 (patch) | |
| tree | e4a38fa4c2f26313c2d374a19c5a4a1904ffdeb1 /examples | |
| parent | 98afb421f408aa8651afff3dba1b21fad71131fe (diff) | |
Improve Vulkan shader-objects implementation. (#1765)
* Improve Vulkan shader-objects implementation.
1. Null bindings no longer crashes.
2. No longer copies push constants to staging CPU buffer before setting it into command buffer. The entry-point shader object now directly sets it into command buffer upon `bindObject` call.
* Update comments
* Fix
* Re-enable 3 tests.
Improved vulkan implementation so that each shader object is responsible for creating descriptor sets on-demand.
Fixed slang reflection to correctly report `ParameterBlock` binding.
* Fix gcc compile error.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/hello-world/main.cpp | 1 | ||||
| -rw-r--r-- | examples/shader-object/main.cpp | 1 | ||||
| -rw-r--r-- | examples/shader-toy/main.cpp | 1 |
3 files changed, 0 insertions, 3 deletions
diff --git a/examples/hello-world/main.cpp b/examples/hello-world/main.cpp index 023c16304..b3bee9c07 100644 --- a/examples/hello-world/main.cpp +++ b/examples/hello-world/main.cpp @@ -244,7 +244,6 @@ Slang::Result initialize() // platforms/APIs. // IDevice::Desc deviceDesc = {}; - deviceDesc.deviceType = DeviceType::Vulkan; gfx::Result res = gfxCreateDevice(&deviceDesc, gDevice.writeRef()); if(SLANG_FAILED(res)) return res; diff --git a/examples/shader-object/main.cpp b/examples/shader-object/main.cpp index 4945de27b..aaafc010a 100644 --- a/examples/shader-object/main.cpp +++ b/examples/shader-object/main.cpp @@ -136,7 +136,6 @@ int main() // interacting with the graphics API. Slang::ComPtr<gfx::IDevice> device; IDevice::Desc deviceDesc = {}; - deviceDesc.deviceType = DeviceType::Vulkan; SLANG_RETURN_ON_FAIL(gfxCreateDevice(&deviceDesc, device.writeRef())); // Now we can load the shader code. diff --git a/examples/shader-toy/main.cpp b/examples/shader-toy/main.cpp index 8e377b42f..c4424b294 100644 --- a/examples/shader-toy/main.cpp +++ b/examples/shader-toy/main.cpp @@ -315,7 +315,6 @@ Result initialize() gWindow->events.sizeChanged = Slang::Action<>(this, &ShaderToyApp::windowSizeChanged); IDevice::Desc deviceDesc; - deviceDesc.deviceType = DeviceType::Vulkan; Result res = gfxCreateDevice(&deviceDesc, gDevice.writeRef()); if(SLANG_FAILED(res)) return res; |
