mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 14:52:10 +01:00
[dxvk] Rename DxvkCopyBufferImage* stuff
Slightly misleadning name when we're going to introduce copies between buffers and images.
This commit is contained in:
parent
c92ee8ee07
commit
3c50ac1f12
@ -938,7 +938,7 @@ namespace dxvk {
|
||||
srcView = srcBuffer->createView(viewInfo);
|
||||
}
|
||||
|
||||
auto pipeInfo = m_common->metaCopy().getCopyBufferImagePipeline();
|
||||
auto pipeInfo = m_common->metaCopy().getCopyFormattedBufferPipeline();
|
||||
VkDescriptorSet descriptorSet = m_descriptorPool->alloc(pipeInfo.dsetLayout);
|
||||
|
||||
std::array<VkWriteDescriptorSet, 2> descriptorWrites;
|
||||
@ -966,7 +966,7 @@ namespace dxvk {
|
||||
|
||||
m_cmd->updateDescriptorSets(descriptorWrites.size(), descriptorWrites.data());
|
||||
|
||||
DxvkCopyBufferImageArgs args = { };
|
||||
DxvkFormattedBufferCopyArgs args = { };
|
||||
args.dstOffset = dstOffset;
|
||||
args.srcOffset = srcOffset;
|
||||
args.extent = extent;
|
||||
@ -3801,7 +3801,7 @@ namespace dxvk {
|
||||
VkImageSubresourceLayers srcSubresource,
|
||||
VkOffset3D srcOffset,
|
||||
VkExtent3D extent) {
|
||||
DxvkMetaCopyFormats viewFormats = m_common->metaCopy().getFormats(
|
||||
DxvkMetaCopyFormats viewFormats = m_common->metaCopy().getCopyImageFormats(
|
||||
dstImage->info().format, dstSubresource.aspectMask,
|
||||
srcImage->info().format, srcSubresource.aspectMask);
|
||||
|
||||
@ -3894,7 +3894,7 @@ namespace dxvk {
|
||||
srcImage, srcSubresource, viewFormats.srcFormat);
|
||||
|
||||
// Create pipeline for the copy operation
|
||||
DxvkMetaCopyPipeline pipeInfo = m_common->metaCopy().getPipeline(
|
||||
DxvkMetaCopyPipeline pipeInfo = m_common->metaCopy().getCopyImagePipeline(
|
||||
views.srcImageView->info().viewType, viewFormats.dstFormat, dstImage->info().sampleCount);
|
||||
|
||||
// Create and initialize descriptor set
|
||||
|
@ -114,7 +114,7 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
DxvkMetaCopyFormats DxvkMetaCopyObjects::getFormats(
|
||||
DxvkMetaCopyFormats DxvkMetaCopyObjects::getCopyImageFormats(
|
||||
VkFormat dstFormat,
|
||||
VkImageAspectFlags dstAspect,
|
||||
VkFormat srcFormat,
|
||||
@ -140,7 +140,7 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
DxvkMetaCopyPipeline DxvkMetaCopyObjects::getPipeline(
|
||||
DxvkMetaCopyPipeline DxvkMetaCopyObjects::getCopyImagePipeline(
|
||||
VkImageViewType viewType,
|
||||
VkFormat dstFormat,
|
||||
VkSampleCountFlagBits dstSamples) {
|
||||
@ -161,11 +161,11 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
DxvkMetaCopyPipeline DxvkMetaCopyObjects::getCopyBufferImagePipeline() {
|
||||
DxvkMetaCopyPipeline DxvkMetaCopyObjects::getCopyFormattedBufferPipeline() {
|
||||
std::lock_guard<dxvk::mutex> lock(m_mutex);
|
||||
|
||||
if (!m_copyBufferImagePipeline.pipeHandle)
|
||||
m_copyBufferImagePipeline = createCopyBufferImagePipeline();
|
||||
m_copyBufferImagePipeline = createCopyFormattedBufferPipeline();
|
||||
|
||||
return m_copyBufferImagePipeline;
|
||||
}
|
||||
@ -184,7 +184,7 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
DxvkMetaCopyPipeline DxvkMetaCopyObjects::createCopyBufferImagePipeline() {
|
||||
DxvkMetaCopyPipeline DxvkMetaCopyObjects::createCopyFormattedBufferPipeline() {
|
||||
DxvkMetaCopyPipeline pipeline;
|
||||
|
||||
std::array<VkDescriptorSetLayoutBinding, 2> bindings = {{
|
||||
@ -199,7 +199,7 @@ namespace dxvk {
|
||||
if (m_vkd->vkCreateDescriptorSetLayout(m_vkd->device(), &setLayoutInfo, nullptr, &pipeline.dsetLayout) != VK_SUCCESS)
|
||||
throw DxvkError("DxvkMetaCopyObjects: Failed to create descriptor set layout");
|
||||
|
||||
VkPushConstantRange pushRange = { VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(DxvkCopyBufferImageArgs) };
|
||||
VkPushConstantRange pushRange = { VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(DxvkFormattedBufferCopyArgs) };
|
||||
|
||||
VkPipelineLayoutCreateInfo pipelineLayoutInfo = { VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO };
|
||||
pipelineLayoutInfo.setLayoutCount = 1;
|
||||
|
@ -17,7 +17,7 @@ namespace dxvk {
|
||||
/**
|
||||
* \brief Push constants for buffer image copies
|
||||
*/
|
||||
struct DxvkCopyBufferImageArgs {
|
||||
struct DxvkFormattedBufferCopyArgs {
|
||||
VkOffset3D dstOffset; uint32_t pad0;
|
||||
VkOffset3D srcOffset; uint32_t pad1;
|
||||
VkExtent3D extent; uint32_t pad2;
|
||||
@ -29,8 +29,8 @@ namespace dxvk {
|
||||
* \brief Pair of view formats for copy operation
|
||||
*/
|
||||
struct DxvkMetaCopyFormats {
|
||||
VkFormat dstFormat;
|
||||
VkFormat srcFormat;
|
||||
VkFormat dstFormat = VK_FORMAT_UNDEFINED;
|
||||
VkFormat srcFormat = VK_FORMAT_UNDEFINED;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -40,9 +40,9 @@ namespace dxvk {
|
||||
* that is used for fragment shader copies.
|
||||
*/
|
||||
struct DxvkMetaCopyPipeline {
|
||||
VkDescriptorSetLayout dsetLayout;
|
||||
VkPipelineLayout pipeLayout;
|
||||
VkPipeline pipeHandle;
|
||||
VkDescriptorSetLayout dsetLayout = VK_NULL_HANDLE;
|
||||
VkPipelineLayout pipeLayout = VK_NULL_HANDLE;
|
||||
VkPipeline pipeHandle = VK_NULL_HANDLE;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -120,7 +120,7 @@ namespace dxvk {
|
||||
* \param [in] srcAspect Source aspect mask
|
||||
* \returns Corresponding color format
|
||||
*/
|
||||
DxvkMetaCopyFormats getFormats(
|
||||
DxvkMetaCopyFormats getCopyImageFormats(
|
||||
VkFormat dstFormat,
|
||||
VkImageAspectFlags dstAspect,
|
||||
VkFormat srcFormat,
|
||||
@ -134,7 +134,7 @@ namespace dxvk {
|
||||
* \param [in] dstSamples Destination sample count
|
||||
* \returns Compatible pipeline for the operation
|
||||
*/
|
||||
DxvkMetaCopyPipeline getPipeline(
|
||||
DxvkMetaCopyPipeline getCopyImagePipeline(
|
||||
VkImageViewType viewType,
|
||||
VkFormat dstFormat,
|
||||
VkSampleCountFlagBits dstSamples);
|
||||
@ -143,7 +143,7 @@ namespace dxvk {
|
||||
* \brief Creates pipeline for buffer image copy
|
||||
* \returns Compute pipeline for buffer image copies
|
||||
*/
|
||||
DxvkMetaCopyPipeline getCopyBufferImagePipeline();
|
||||
DxvkMetaCopyPipeline getCopyFormattedBufferPipeline();
|
||||
|
||||
private:
|
||||
|
||||
@ -174,7 +174,7 @@ namespace dxvk {
|
||||
VkShaderModule createShaderModule(
|
||||
const SpirvCodeBuffer& code) const;
|
||||
|
||||
DxvkMetaCopyPipeline createCopyBufferImagePipeline();
|
||||
DxvkMetaCopyPipeline createCopyFormattedBufferPipeline();
|
||||
|
||||
DxvkMetaCopyPipeline createPipeline(
|
||||
const DxvkMetaCopyPipelineKey& key);
|
||||
|
Loading…
x
Reference in New Issue
Block a user