mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 04:08:52 +01:00
[dxvk] Add command list parameter to cmdBindDescriptorSet(s)
This commit is contained in:
parent
aa162365ce
commit
4ce200bcae
@ -442,18 +442,20 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
void cmdBindDescriptorSet(
|
void cmdBindDescriptorSet(
|
||||||
|
DxvkCmdBuffer cmdBuffer,
|
||||||
VkPipelineBindPoint pipeline,
|
VkPipelineBindPoint pipeline,
|
||||||
VkPipelineLayout pipelineLayout,
|
VkPipelineLayout pipelineLayout,
|
||||||
VkDescriptorSet descriptorSet,
|
VkDescriptorSet descriptorSet,
|
||||||
uint32_t dynamicOffsetCount,
|
uint32_t dynamicOffsetCount,
|
||||||
const uint32_t* pDynamicOffsets) {
|
const uint32_t* pDynamicOffsets) {
|
||||||
m_vkd->vkCmdBindDescriptorSets(m_cmd.execBuffer,
|
m_vkd->vkCmdBindDescriptorSets(getCmdBuffer(cmdBuffer),
|
||||||
pipeline, pipelineLayout, 0, 1,
|
pipeline, pipelineLayout, 0, 1,
|
||||||
&descriptorSet, dynamicOffsetCount, pDynamicOffsets);
|
&descriptorSet, dynamicOffsetCount, pDynamicOffsets);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void cmdBindDescriptorSets(
|
void cmdBindDescriptorSets(
|
||||||
|
DxvkCmdBuffer cmdBuffer,
|
||||||
VkPipelineBindPoint pipeline,
|
VkPipelineBindPoint pipeline,
|
||||||
VkPipelineLayout pipelineLayout,
|
VkPipelineLayout pipelineLayout,
|
||||||
uint32_t firstSet,
|
uint32_t firstSet,
|
||||||
@ -461,7 +463,7 @@ namespace dxvk {
|
|||||||
const VkDescriptorSet* descriptorSets,
|
const VkDescriptorSet* descriptorSets,
|
||||||
uint32_t dynamicOffsetCount,
|
uint32_t dynamicOffsetCount,
|
||||||
const uint32_t* pDynamicOffsets) {
|
const uint32_t* pDynamicOffsets) {
|
||||||
m_vkd->vkCmdBindDescriptorSets(m_cmd.execBuffer,
|
m_vkd->vkCmdBindDescriptorSets(getCmdBuffer(cmdBuffer),
|
||||||
pipeline, pipelineLayout, firstSet, descriptorSetCount,
|
pipeline, pipelineLayout, firstSet, descriptorSetCount,
|
||||||
descriptorSets, dynamicOffsetCount, pDynamicOffsets);
|
descriptorSets, dynamicOffsetCount, pDynamicOffsets);
|
||||||
}
|
}
|
||||||
|
@ -310,10 +310,9 @@ namespace dxvk {
|
|||||||
m_cmd->cmdBindPipeline(
|
m_cmd->cmdBindPipeline(
|
||||||
VK_PIPELINE_BIND_POINT_COMPUTE,
|
VK_PIPELINE_BIND_POINT_COMPUTE,
|
||||||
pipeInfo.pipeline);
|
pipeInfo.pipeline);
|
||||||
m_cmd->cmdBindDescriptorSet(
|
m_cmd->cmdBindDescriptorSet(DxvkCmdBuffer::ExecBuffer,
|
||||||
VK_PIPELINE_BIND_POINT_COMPUTE,
|
VK_PIPELINE_BIND_POINT_COMPUTE, pipeInfo.pipeLayout,
|
||||||
pipeInfo.pipeLayout, descriptorSet,
|
descriptorSet, 0, nullptr);
|
||||||
0, nullptr);
|
|
||||||
m_cmd->cmdPushConstants(DxvkCmdBuffer::ExecBuffer,
|
m_cmd->cmdPushConstants(DxvkCmdBuffer::ExecBuffer,
|
||||||
pipeInfo.pipeLayout, VK_SHADER_STAGE_COMPUTE_BIT,
|
pipeInfo.pipeLayout, VK_SHADER_STAGE_COMPUTE_BIT,
|
||||||
0, sizeof(pushArgs), &pushArgs);
|
0, sizeof(pushArgs), &pushArgs);
|
||||||
@ -816,10 +815,9 @@ namespace dxvk {
|
|||||||
VK_PIPELINE_BIND_POINT_COMPUTE,
|
VK_PIPELINE_BIND_POINT_COMPUTE,
|
||||||
pipeInfo.pipeHandle);
|
pipeInfo.pipeHandle);
|
||||||
|
|
||||||
m_cmd->cmdBindDescriptorSet(
|
m_cmd->cmdBindDescriptorSet(DxvkCmdBuffer::ExecBuffer,
|
||||||
VK_PIPELINE_BIND_POINT_COMPUTE,
|
VK_PIPELINE_BIND_POINT_COMPUTE, pipeInfo.pipeLayout,
|
||||||
pipeInfo.pipeLayout, dset,
|
dset, 0, nullptr);
|
||||||
0, nullptr);
|
|
||||||
|
|
||||||
m_cmd->cmdPushConstants(DxvkCmdBuffer::ExecBuffer,
|
m_cmd->cmdPushConstants(DxvkCmdBuffer::ExecBuffer,
|
||||||
pipeInfo.pipeLayout, VK_SHADER_STAGE_COMPUTE_BIT,
|
pipeInfo.pipeLayout, VK_SHADER_STAGE_COMPUTE_BIT,
|
||||||
@ -983,10 +981,9 @@ namespace dxvk {
|
|||||||
VK_PIPELINE_BIND_POINT_COMPUTE,
|
VK_PIPELINE_BIND_POINT_COMPUTE,
|
||||||
pipeInfo.pipeHandle);
|
pipeInfo.pipeHandle);
|
||||||
|
|
||||||
m_cmd->cmdBindDescriptorSet(
|
m_cmd->cmdBindDescriptorSet(DxvkCmdBuffer::ExecBuffer,
|
||||||
VK_PIPELINE_BIND_POINT_COMPUTE,
|
VK_PIPELINE_BIND_POINT_COMPUTE, pipeInfo.pipeLayout,
|
||||||
pipeInfo.pipeLayout, descriptorSet,
|
descriptorSet, 0, nullptr);
|
||||||
0, nullptr);
|
|
||||||
|
|
||||||
m_cmd->cmdPushConstants(DxvkCmdBuffer::ExecBuffer,
|
m_cmd->cmdPushConstants(DxvkCmdBuffer::ExecBuffer,
|
||||||
pipeInfo.pipeLayout, VK_SHADER_STAGE_COMPUTE_BIT,
|
pipeInfo.pipeLayout, VK_SHADER_STAGE_COMPUTE_BIT,
|
||||||
@ -1124,10 +1121,9 @@ namespace dxvk {
|
|||||||
VK_PIPELINE_BIND_POINT_COMPUTE,
|
VK_PIPELINE_BIND_POINT_COMPUTE,
|
||||||
pipeInfo.pipeHandle);
|
pipeInfo.pipeHandle);
|
||||||
|
|
||||||
m_cmd->cmdBindDescriptorSet(
|
m_cmd->cmdBindDescriptorSet(DxvkCmdBuffer::ExecBuffer,
|
||||||
VK_PIPELINE_BIND_POINT_COMPUTE,
|
VK_PIPELINE_BIND_POINT_COMPUTE, pipeInfo.pipeLayout,
|
||||||
pipeInfo.pipeLayout, dset,
|
dset, 0, nullptr);
|
||||||
0, nullptr);
|
|
||||||
|
|
||||||
m_cmd->cmdPushConstants(DxvkCmdBuffer::ExecBuffer,
|
m_cmd->cmdPushConstants(DxvkCmdBuffer::ExecBuffer,
|
||||||
pipeInfo.pipeLayout, VK_SHADER_STAGE_COMPUTE_BIT,
|
pipeInfo.pipeLayout, VK_SHADER_STAGE_COMPUTE_BIT,
|
||||||
@ -1808,8 +1804,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
m_cmd->cmdBeginRendering(&renderingInfo);
|
m_cmd->cmdBeginRendering(&renderingInfo);
|
||||||
m_cmd->cmdBindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, pipeInfo.pipeHandle);
|
m_cmd->cmdBindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, pipeInfo.pipeHandle);
|
||||||
m_cmd->cmdBindDescriptorSet(VK_PIPELINE_BIND_POINT_GRAPHICS,
|
m_cmd->cmdBindDescriptorSet(DxvkCmdBuffer::ExecBuffer,
|
||||||
pipeInfo.pipeLayout, descriptorWrite.dstSet, 0, nullptr);
|
VK_PIPELINE_BIND_POINT_GRAPHICS, pipeInfo.pipeLayout,
|
||||||
|
descriptorWrite.dstSet, 0, nullptr);
|
||||||
|
|
||||||
m_cmd->cmdSetViewport(1, &viewport);
|
m_cmd->cmdSetViewport(1, &viewport);
|
||||||
m_cmd->cmdSetScissor(1, &scissor);
|
m_cmd->cmdSetScissor(1, &scissor);
|
||||||
@ -3216,8 +3213,9 @@ namespace dxvk {
|
|||||||
descriptorWrite.pImageInfo = &descriptorImage;
|
descriptorWrite.pImageInfo = &descriptorImage;
|
||||||
|
|
||||||
m_cmd->updateDescriptorSets(1, &descriptorWrite);
|
m_cmd->updateDescriptorSets(1, &descriptorWrite);
|
||||||
m_cmd->cmdBindDescriptorSet(VK_PIPELINE_BIND_POINT_GRAPHICS,
|
m_cmd->cmdBindDescriptorSet(DxvkCmdBuffer::ExecBuffer,
|
||||||
pipeInfo.pipeLayout, descriptorWrite.dstSet, 0, nullptr);
|
VK_PIPELINE_BIND_POINT_GRAPHICS, pipeInfo.pipeLayout,
|
||||||
|
descriptorWrite.dstSet, 0, nullptr);
|
||||||
|
|
||||||
// Compute shader parameters for the operation
|
// Compute shader parameters for the operation
|
||||||
VkExtent3D srcExtent = srcView->mipLevelExtent(0);
|
VkExtent3D srcExtent = srcView->mipLevelExtent(0);
|
||||||
@ -3665,10 +3663,9 @@ namespace dxvk {
|
|||||||
m_cmd->cmdBindPipeline(
|
m_cmd->cmdBindPipeline(
|
||||||
VK_PIPELINE_BIND_POINT_COMPUTE,
|
VK_PIPELINE_BIND_POINT_COMPUTE,
|
||||||
pipeInfo.pipeline);
|
pipeInfo.pipeline);
|
||||||
m_cmd->cmdBindDescriptorSet(
|
m_cmd->cmdBindDescriptorSet(DxvkCmdBuffer::ExecBuffer,
|
||||||
VK_PIPELINE_BIND_POINT_COMPUTE,
|
VK_PIPELINE_BIND_POINT_COMPUTE, pipeInfo.pipeLayout,
|
||||||
pipeInfo.pipeLayout, descriptorSet,
|
descriptorSet, 0, nullptr);
|
||||||
0, nullptr);
|
|
||||||
m_cmd->cmdPushConstants(DxvkCmdBuffer::ExecBuffer,
|
m_cmd->cmdPushConstants(DxvkCmdBuffer::ExecBuffer,
|
||||||
pipeInfo.pipeLayout, VK_SHADER_STAGE_COMPUTE_BIT,
|
pipeInfo.pipeLayout, VK_SHADER_STAGE_COMPUTE_BIT,
|
||||||
0, sizeof(pushArgs), &pushArgs);
|
0, sizeof(pushArgs), &pushArgs);
|
||||||
@ -3970,8 +3967,9 @@ namespace dxvk {
|
|||||||
// Perform the actual copy operation
|
// Perform the actual copy operation
|
||||||
m_cmd->cmdBeginRendering(&renderingInfo);
|
m_cmd->cmdBeginRendering(&renderingInfo);
|
||||||
m_cmd->cmdBindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, pipeInfo.pipeHandle);
|
m_cmd->cmdBindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, pipeInfo.pipeHandle);
|
||||||
m_cmd->cmdBindDescriptorSet(VK_PIPELINE_BIND_POINT_GRAPHICS,
|
m_cmd->cmdBindDescriptorSet(DxvkCmdBuffer::ExecBuffer,
|
||||||
pipeInfo.pipeLayout, descriptorSet, 0, nullptr);
|
VK_PIPELINE_BIND_POINT_GRAPHICS, pipeInfo.pipeLayout,
|
||||||
|
descriptorSet, 0, nullptr);
|
||||||
|
|
||||||
m_cmd->cmdSetViewport(1, &viewport);
|
m_cmd->cmdSetViewport(1, &viewport);
|
||||||
m_cmd->cmdSetScissor(1, &scissor);
|
m_cmd->cmdSetScissor(1, &scissor);
|
||||||
@ -4636,8 +4634,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
m_cmd->cmdBeginRendering(&renderingInfo);
|
m_cmd->cmdBeginRendering(&renderingInfo);
|
||||||
m_cmd->cmdBindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, pipeInfo.pipeHandle);
|
m_cmd->cmdBindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, pipeInfo.pipeHandle);
|
||||||
m_cmd->cmdBindDescriptorSet(VK_PIPELINE_BIND_POINT_GRAPHICS,
|
m_cmd->cmdBindDescriptorSet(DxvkCmdBuffer::ExecBuffer,
|
||||||
pipeInfo.pipeLayout, descriptorSet, 0, nullptr);
|
VK_PIPELINE_BIND_POINT_GRAPHICS, pipeInfo.pipeLayout,
|
||||||
|
descriptorSet, 0, nullptr);
|
||||||
m_cmd->cmdSetViewport(1, &viewport);
|
m_cmd->cmdSetViewport(1, &viewport);
|
||||||
m_cmd->cmdSetScissor(1, &scissor);
|
m_cmd->cmdSetScissor(1, &scissor);
|
||||||
m_cmd->cmdPushConstants(DxvkCmdBuffer::ExecBuffer,
|
m_cmd->cmdPushConstants(DxvkCmdBuffer::ExecBuffer,
|
||||||
@ -5540,8 +5539,8 @@ namespace dxvk {
|
|||||||
uint32_t firstSet = bit::tzcnt(dirtySetMask);
|
uint32_t firstSet = bit::tzcnt(dirtySetMask);
|
||||||
dirtySetMask &= (~1u) << setIndex;
|
dirtySetMask &= (~1u) << setIndex;
|
||||||
|
|
||||||
m_cmd->cmdBindDescriptorSets(BindPoint,
|
m_cmd->cmdBindDescriptorSets(DxvkCmdBuffer::ExecBuffer,
|
||||||
layout->getPipelineLayout(independentSets),
|
BindPoint, layout->getPipelineLayout(independentSets),
|
||||||
firstSet, setIndex - firstSet + 1, &sets[firstSet],
|
firstSet, setIndex - firstSet + 1, &sets[firstSet],
|
||||||
0, nullptr);
|
0, nullptr);
|
||||||
}
|
}
|
||||||
|
@ -145,8 +145,11 @@ namespace dxvk {
|
|||||||
set, 1, 0, 1, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, &gammaDescriptor },
|
set, 1, 0, 1, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, &gammaDescriptor },
|
||||||
}};
|
}};
|
||||||
|
|
||||||
ctx.cmd->updateDescriptorSets(descriptorWrites.size(), descriptorWrites.data());
|
ctx.cmd->updateDescriptorSets(
|
||||||
ctx.cmd->cmdBindDescriptorSet(VK_PIPELINE_BIND_POINT_GRAPHICS, m_pipelineLayout, set, 0, nullptr);
|
descriptorWrites.size(), descriptorWrites.data());
|
||||||
|
ctx.cmd->cmdBindDescriptorSet(DxvkCmdBuffer::ExecBuffer,
|
||||||
|
VK_PIPELINE_BIND_POINT_GRAPHICS, m_pipelineLayout,
|
||||||
|
set, 0, nullptr);
|
||||||
|
|
||||||
PushConstants args = { };
|
PushConstants args = { };
|
||||||
args.srcOffset = srcRect.offset;
|
args.srcOffset = srcRect.offset;
|
||||||
|
Loading…
Reference in New Issue
Block a user