diff options
| author | Yong He <yonghe@outlook.com> | 2021-12-09 10:46:41 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-09 10:46:41 -0800 |
| commit | 1c99a986ae12a3f1ce4cee86191052183d37208a (patch) | |
| tree | e9903d1e569badef813e3f5f33696683bd34f3b0 /tools/gfx/vulkan/render-vk.cpp | |
| parent | 4ca37fea2829ad9c623b94d77bb0311f76ad0971 (diff) | |
Remove `PipelineType` from gfx header. (#2051)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx/vulkan/render-vk.cpp')
| -rw-r--r-- | tools/gfx/vulkan/render-vk.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/tools/gfx/vulkan/render-vk.cpp b/tools/gfx/vulkan/render-vk.cpp index f949742ea..c48faeb7b 100644 --- a/tools/gfx/vulkan/render-vk.cpp +++ b/tools/gfx/vulkan/render-vk.cpp @@ -2279,9 +2279,8 @@ public: class ShaderProgramImpl : public ShaderProgramBase { public: - ShaderProgramImpl(VKDevice* device, PipelineType pipelineType) + ShaderProgramImpl(VKDevice* device) : m_device(device) - , m_pipelineType(pipelineType) { for (auto& shaderModule : m_modules) shaderModule = VK_NULL_HANDLE; @@ -2306,8 +2305,6 @@ public: BreakableReference<VKDevice> m_device; - PipelineType m_pipelineType; - Array<VkPipelineShaderStageCreateInfo, 8> m_stageCreateInfos; Array<ComPtr<ISlangBlob>, 8> m_codeBlobs; //< To keep storage of code in scope Array<VkShaderModule, 8> m_modules; @@ -4033,8 +4030,7 @@ public: void prepareDraw() { auto pipeline = static_cast<PipelineStateImpl*>(m_currentPipeline.Ptr()); - if (!pipeline || static_cast<ShaderProgramImpl*>(pipeline->m_program.Ptr()) - ->m_pipelineType != PipelineType::Graphics) + if (!pipeline) { assert(!"Invalid render pipeline"); return; @@ -4195,9 +4191,7 @@ public: virtual SLANG_NO_THROW void SLANG_MCALL dispatchCompute(int x, int y, int z) override { auto pipeline = static_cast<PipelineStateImpl*>(m_currentPipeline.Ptr()); - if (!pipeline || - static_cast<ShaderProgramImpl*>(pipeline->m_program.Ptr())->m_pipelineType != - PipelineType::Compute) + if (!pipeline) { assert(!"Invalid compute pipeline"); return; @@ -7893,8 +7887,7 @@ static VkImageViewType _calcImageViewType(ITextureResource::Type type, const ITe Result VKDevice::createProgram(const IShaderProgram::Desc& desc, IShaderProgram** outProgram) { - RefPtr<ShaderProgramImpl> shaderProgram = new ShaderProgramImpl(this, desc.pipelineType); - shaderProgram->m_pipelineType = desc.pipelineType; + RefPtr<ShaderProgramImpl> shaderProgram = new ShaderProgramImpl(this); shaderProgram->slangProgram = desc.slangProgram; m_deviceObjectsWithPotentialBackReferences.add(shaderProgram); |
