mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-13 16:08:50 +01:00
[dxvk] Pass VS and FS libraries to graphics pipelines
This commit is contained in:
parent
cb56e16a4b
commit
a72bf02374
@ -461,14 +461,18 @@ namespace dxvk {
|
||||
DxvkDevice* device,
|
||||
DxvkPipelineManager* pipeMgr,
|
||||
DxvkGraphicsPipelineShaders shaders,
|
||||
DxvkBindingLayoutObjects* layout)
|
||||
DxvkBindingLayoutObjects* layout,
|
||||
DxvkShaderPipelineLibrary* vsLibrary,
|
||||
DxvkShaderPipelineLibrary* fsLibrary)
|
||||
: m_device (device),
|
||||
m_cache (&pipeMgr->m_cache),
|
||||
m_stateCache (&pipeMgr->m_stateCache),
|
||||
m_stats (&pipeMgr->m_stats),
|
||||
m_shaders (std::move(shaders)),
|
||||
m_bindings (layout),
|
||||
m_barrier (layout->getGlobalBarrier()) {
|
||||
m_barrier (layout->getGlobalBarrier()),
|
||||
m_vsLibrary (vsLibrary),
|
||||
m_fsLibrary (fsLibrary) {
|
||||
m_vsIn = m_shaders.vs != nullptr ? m_shaders.vs->info().inputMask : 0;
|
||||
m_fsOut = m_shaders.fs != nullptr ? m_shaders.fs->info().outputMask : 0;
|
||||
|
||||
|
@ -292,7 +292,9 @@ namespace dxvk {
|
||||
DxvkDevice* device,
|
||||
DxvkPipelineManager* pipeMgr,
|
||||
DxvkGraphicsPipelineShaders shaders,
|
||||
DxvkBindingLayoutObjects* layout);
|
||||
DxvkBindingLayoutObjects* layout,
|
||||
DxvkShaderPipelineLibrary* vsLibrary,
|
||||
DxvkShaderPipelineLibrary* fsLibrary);
|
||||
|
||||
~DxvkGraphicsPipeline();
|
||||
|
||||
@ -381,6 +383,9 @@ namespace dxvk {
|
||||
DxvkGlobalPipelineBarrier m_barrier;
|
||||
DxvkGraphicsPipelineFlags m_flags;
|
||||
|
||||
DxvkShaderPipelineLibrary* m_vsLibrary;
|
||||
DxvkShaderPipelineLibrary* m_fsLibrary;
|
||||
|
||||
uint32_t m_vsIn = 0;
|
||||
uint32_t m_fsOut = 0;
|
||||
|
||||
|
@ -227,10 +227,20 @@ namespace dxvk {
|
||||
|
||||
auto layout = createPipelineLayout(mergedLayout);
|
||||
|
||||
DxvkShaderPipelineLibrary* vsLibrary = nullptr;
|
||||
DxvkShaderPipelineLibrary* fsLibrary = nullptr;
|
||||
|
||||
if (shaders.tcs == nullptr && shaders.tes == nullptr && shaders.gs == nullptr) {
|
||||
// TODO handle null fs properly
|
||||
vsLibrary = findPipelineLibrary(shaders.vs);
|
||||
fsLibrary = findPipelineLibrary(shaders.fs);
|
||||
}
|
||||
|
||||
auto iter = m_graphicsPipelines.emplace(
|
||||
std::piecewise_construct,
|
||||
std::tuple(shaders),
|
||||
std::tuple(m_device, this, shaders, layout));
|
||||
std::tuple(m_device, this, shaders,
|
||||
layout, vsLibrary, fsLibrary));
|
||||
return &iter.first->second;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user