Skip to content

Commit

Permalink
[dxvk] Use dynamic offsets for both graphics and compute pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
doitsujin committed Jun 21, 2018
1 parent 4b5ec1b commit db7a7fa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/dxvk/dxvk_compute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ namespace dxvk {
m_cache(cache) {
DxvkDescriptorSlotMapping slotMapping;
cs->defineResourceSlots(slotMapping);

slotMapping.makeDescriptorsDynamic(
device->options().maxNumDynamicUniformBuffers,
device->options().maxNumDynamicStorageBuffers);

m_layout = new DxvkPipelineLayout(m_vkd,
slotMapping.bindingCount(),
Expand Down
4 changes: 2 additions & 2 deletions src/dxvk/dxvk_compute.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ namespace dxvk {
* slots used by the pipeline.
* \returns Pipeline layout
*/
Rc<DxvkPipelineLayout> layout() const {
return m_layout;
DxvkPipelineLayout* layout() const {
return m_layout.ptr();
}

/**
Expand Down
4 changes: 4 additions & 0 deletions src/dxvk/dxvk_graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ namespace dxvk {
if (gs != nullptr) gs ->defineResourceSlots(slotMapping);
if (fs != nullptr) fs ->defineResourceSlots(slotMapping);

slotMapping.makeDescriptorsDynamic(
device->options().maxNumDynamicUniformBuffers,
device->options().maxNumDynamicStorageBuffers);

m_layout = new DxvkPipelineLayout(m_vkd,
slotMapping.bindingCount(),
slotMapping.bindingInfos(),
Expand Down
4 changes: 2 additions & 2 deletions src/dxvk/dxvk_graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ namespace dxvk {
* slots used by the pipeline.
* \returns Pipeline layout
*/
Rc<DxvkPipelineLayout> layout() const {
return m_layout;
DxvkPipelineLayout* layout() const {
return m_layout.ptr();
}

/**
Expand Down

0 comments on commit db7a7fa

Please sign in to comment.