GPUDevice: Drop SingleTextureAndUBOAndPushConstants

Had a copypaste error, and this is a bad idea anyway.
dev
Stenzek 2 weeks ago
parent cbe7951be6
commit 1ab327d6d5
No known key found for this signature in database

@ -1341,7 +1341,7 @@ bool FullscreenUI::CompilePipelines(Error* error)
GPUPipeline::VertexAttribute::Type::UNorm8, 4, OFFSETOF(ImDrawVert, col)),
};
plconfig.layout = GPUPipeline::Layout::SingleTextureAndUBOAndPushConstants;
plconfig.layout = GPUPipeline::Layout::MultiTextureAndUBOAndPushConstants;
plconfig.input_layout.vertex_attributes = imgui_attributes;
plconfig.input_layout.vertex_stride = sizeof(ImDrawVert);
plconfig.primitive = GPUPipeline::Primitive::Triangles;

@ -1609,7 +1609,6 @@ void D3D12Device::PushUniformBuffer(ID3D12GraphicsCommandList4* const cmdlist, b
static constexpr std::array<u8, static_cast<u8>(GPUPipeline::Layout::MaxCount)> push_parameters = {
0, // SingleTextureAndUBO
2, // SingleTextureAndPushConstants
3, // SingleTextureAndUBOAndPushConstants
1, // SingleTextureBufferAndPushConstants
0, // MultiTextureAndUBO
2, // MultiTextureAndPushConstants
@ -1694,24 +1693,6 @@ bool D3D12Device::CreateRootSignatures(Error* error)
D3D12::SetObjectName(rs.Get(), "Single Texture Pipeline Layout");
}
{
auto& rs = m_root_signatures[rov][static_cast<u8>(GPUPipeline::Layout::SingleTextureAndUBOAndPushConstants)];
rsb.SetInputAssemblerFlag();
rsb.AddDescriptorTable(D3D12_DESCRIPTOR_RANGE_TYPE_SRV, 0, 1, D3D12_SHADER_VISIBILITY_PIXEL);
rsb.AddDescriptorTable(D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER, 0, 1, D3D12_SHADER_VISIBILITY_PIXEL);
rsb.AddCBVParameter(0, D3D12_SHADER_VISIBILITY_ALL);
if (rov)
{
rsb.AddDescriptorTable(D3D12_DESCRIPTOR_RANGE_TYPE_UAV, 0, MAX_IMAGE_RENDER_TARGETS,
D3D12_SHADER_VISIBILITY_PIXEL);
}
rsb.Add32BitConstants(1, UNIFORM_PUSH_CONSTANTS_SIZE / sizeof(u32), D3D12_SHADER_VISIBILITY_ALL);
if (!(rs = rsb.Create(error, true)))
return false;
D3D12::SetObjectName(rs.Get(), "Single Texture + UBO + Push Constant Pipeline Layout");
}
{
auto& rs = m_root_signatures[rov][static_cast<u8>(GPUPipeline::Layout::SingleTextureBufferAndPushConstants)];
@ -2573,7 +2554,6 @@ bool D3D12Device::UpdateParametersForLayout(u32 dirty)
ID3D12GraphicsCommandList4* cmdlist = GetCommandList();
if constexpr (layout == GPUPipeline::Layout::SingleTextureAndUBO ||
layout == GPUPipeline::Layout::SingleTextureAndUBOAndPushConstants ||
layout == GPUPipeline::Layout::MultiTextureAndUBO ||
layout == GPUPipeline::Layout::MultiTextureAndUBOAndPushConstants ||
layout == GPUPipeline::Layout::ComputeMultiTextureAndUBO)
@ -2675,16 +2655,15 @@ bool D3D12Device::UpdateParametersForLayout(u32 dirty)
m_device->CopyDescriptors(1, &gpu_handle.cpu_handle, &dst_size, MAX_IMAGE_RENDER_TARGETS, src_handles, src_sizes,
D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);
constexpr u32 rov_param = IsComputeLayout(layout) ?
2 :
((layout == GPUPipeline::Layout::SingleTextureBufferAndPushConstants) ?
1 :
((layout == GPUPipeline::Layout::SingleTextureAndUBO ||
layout == GPUPipeline::Layout::SingleTextureAndUBOAndPushConstants ||
layout == GPUPipeline::Layout::MultiTextureAndUBO ||
layout == GPUPipeline::Layout::MultiTextureAndUBOAndPushConstants) ?
3 :
2));
constexpr u32 rov_param =
IsComputeLayout(layout) ?
2 :
((layout == GPUPipeline::Layout::SingleTextureBufferAndPushConstants) ?
1 :
((layout == GPUPipeline::Layout::SingleTextureAndUBO || layout == GPUPipeline::Layout::MultiTextureAndUBO ||
layout == GPUPipeline::Layout::MultiTextureAndUBOAndPushConstants) ?
3 :
2));
if constexpr (!IsComputeLayout(layout))
cmdlist->SetGraphicsRootDescriptorTable(rov_param, gpu_handle);
else
@ -2704,9 +2683,6 @@ bool D3D12Device::UpdateRootParameters(u32 dirty)
case GPUPipeline::Layout::SingleTextureAndPushConstants:
return UpdateParametersForLayout<GPUPipeline::Layout::SingleTextureAndPushConstants>(dirty);
case GPUPipeline::Layout::SingleTextureAndUBOAndPushConstants:
return UpdateParametersForLayout<GPUPipeline::Layout::SingleTextureAndPushConstants>(dirty);
case GPUPipeline::Layout::SingleTextureBufferAndPushConstants:
return UpdateParametersForLayout<GPUPipeline::Layout::SingleTextureBufferAndPushConstants>(dirty);

@ -133,9 +133,6 @@ public:
// 128 byte UBO via push constants, 1 texture.
SingleTextureAndPushConstants,
// 128 byte UBO via push constants, 1 streamed UBO, 1 texture.
SingleTextureAndUBOAndPushConstants,
// 128 byte UBO via push constants, 1 texture buffer/SSBO.
SingleTextureBufferAndPushConstants,
@ -659,7 +656,6 @@ public:
constexpr std::array<u8, static_cast<u8>(GPUPipeline::Layout::MaxCount)> counts = {
1, // SingleTextureAndUBO
1, // SingleTextureAndPushConstants
1, // SingleTextureAndUBOAndPushConstants
0, // SingleTextureBufferAndPushConstants
MAX_TEXTURE_SAMPLERS, // MultiTextureAndUBO
MAX_TEXTURE_SAMPLERS, // MultiTextureAndPushConstants

@ -2481,21 +2481,6 @@ bool VulkanDevice::CreatePipelineLayouts()
Vulkan::SetObjectName(m_device, pl, "Single Texture Pipeline Layout");
}
{
VkPipelineLayout& pl =
m_pipeline_layouts[type][static_cast<u8>(GPUPipeline::Layout::SingleTextureAndUBOAndPushConstants)];
plb.AddDescriptorSet(m_ubo_ds_layout);
plb.AddDescriptorSet(m_single_texture_ds_layout);
plb.AddPushConstants(UNIFORM_PUSH_CONSTANTS_STAGES, 0, UNIFORM_PUSH_CONSTANTS_SIZE);
if (feedback_loop)
plb.AddDescriptorSet(m_feedback_loop_ds_layout);
else if (rov)
plb.AddDescriptorSet(m_image_ds_layout);
if ((pl = plb.Create(m_device)) == VK_NULL_HANDLE)
return false;
Vulkan::SetObjectName(m_device, pl, "Single Texture + UBO + Push Constant Pipeline Layout");
}
{
VkPipelineLayout& pl =
m_pipeline_layouts[type][static_cast<u8>(GPUPipeline::Layout::SingleTextureBufferAndPushConstants)];
@ -3423,11 +3408,10 @@ bool VulkanDevice::UpdateDescriptorSetsForLayout(u32 dirty)
[[maybe_unused]] bool new_dynamic_offsets = false;
constexpr bool is_compute = IsComputeLayout(layout);
constexpr bool has_ubo = (layout == GPUPipeline::Layout::SingleTextureAndUBO ||
layout == GPUPipeline::Layout::SingleTextureAndUBOAndPushConstants ||
layout == GPUPipeline::Layout::MultiTextureAndUBO ||
layout == GPUPipeline::Layout::MultiTextureAndUBOAndPushConstants ||
layout == GPUPipeline::Layout::ComputeMultiTextureAndUBO);
constexpr bool has_ubo =
(layout == GPUPipeline::Layout::SingleTextureAndUBO || layout == GPUPipeline::Layout::MultiTextureAndUBO ||
layout == GPUPipeline::Layout::MultiTextureAndUBOAndPushConstants ||
layout == GPUPipeline::Layout::ComputeMultiTextureAndUBO);
constexpr VkPipelineBindPoint vk_bind_point =
(is_compute ? VK_PIPELINE_BIND_POINT_COMPUTE : VK_PIPELINE_BIND_POINT_GRAPHICS);
const VkPipelineLayout vk_pipeline_layout = GetCurrentVkPipelineLayout(is_compute);
@ -3451,7 +3435,6 @@ bool VulkanDevice::UpdateDescriptorSetsForLayout(u32 dirty)
}
if constexpr (layout == GPUPipeline::Layout::SingleTextureAndUBO ||
layout == GPUPipeline::Layout::SingleTextureAndUBOAndPushConstants ||
layout == GPUPipeline::Layout::SingleTextureAndPushConstants)
{
VulkanTexture* const tex =
@ -3573,9 +3556,6 @@ bool VulkanDevice::UpdateDescriptorSets(u32 dirty)
case GPUPipeline::Layout::SingleTextureAndPushConstants:
return UpdateDescriptorSetsForLayout<GPUPipeline::Layout::SingleTextureAndPushConstants>(dirty);
case GPUPipeline::Layout::SingleTextureAndUBOAndPushConstants:
return UpdateDescriptorSetsForLayout<GPUPipeline::Layout::SingleTextureAndUBOAndPushConstants>(dirty);
case GPUPipeline::Layout::SingleTextureBufferAndPushConstants:
return UpdateDescriptorSetsForLayout<GPUPipeline::Layout::SingleTextureBufferAndPushConstants>(dirty);

Loading…
Cancel
Save