mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-14 00:48:44 +01:00
[hud] Pass new shader binding info struct to HUD shaders
This commit is contained in:
parent
89dadc8453
commit
7b8b50bca6
@ -159,6 +159,15 @@ namespace dxvk::hud {
|
|||||||
SpirvCodeBuffer vsCode(hud_text_vert);
|
SpirvCodeBuffer vsCode(hud_text_vert);
|
||||||
SpirvCodeBuffer fsCode(hud_text_frag);
|
SpirvCodeBuffer fsCode(hud_text_frag);
|
||||||
|
|
||||||
|
const std::array<DxvkBindingInfo, 2> vsBindings = {{
|
||||||
|
{ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 0, VK_IMAGE_VIEW_TYPE_MAX_ENUM, 0, VK_ACCESS_SHADER_READ_BIT },
|
||||||
|
{ VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, 1, VK_IMAGE_VIEW_TYPE_MAX_ENUM, 0, VK_ACCESS_SHADER_READ_BIT },
|
||||||
|
}};
|
||||||
|
|
||||||
|
const std::array<DxvkBindingInfo, 1> fsBindings = {{
|
||||||
|
{ VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 2, VK_IMAGE_VIEW_TYPE_MAX_ENUM, 0, VK_ACCESS_SHADER_READ_BIT },
|
||||||
|
}};
|
||||||
|
|
||||||
const std::array<DxvkResourceSlot, 2> vsResources = {{
|
const std::array<DxvkResourceSlot, 2> vsResources = {{
|
||||||
{ 0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_IMAGE_VIEW_TYPE_MAX_ENUM },
|
{ 0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_IMAGE_VIEW_TYPE_MAX_ENUM },
|
||||||
{ 1, VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, VK_IMAGE_VIEW_TYPE_MAX_ENUM },
|
{ 1, VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, VK_IMAGE_VIEW_TYPE_MAX_ENUM },
|
||||||
@ -170,6 +179,8 @@ namespace dxvk::hud {
|
|||||||
|
|
||||||
DxvkShaderCreateInfo vsInfo;
|
DxvkShaderCreateInfo vsInfo;
|
||||||
vsInfo.stage = VK_SHADER_STAGE_VERTEX_BIT;
|
vsInfo.stage = VK_SHADER_STAGE_VERTEX_BIT;
|
||||||
|
vsInfo.bindingCount = vsBindings.size();
|
||||||
|
vsInfo.bindings = vsBindings.data();
|
||||||
vsInfo.resourceSlotCount = vsResources.size();
|
vsInfo.resourceSlotCount = vsResources.size();
|
||||||
vsInfo.resourceSlots = vsResources.data();
|
vsInfo.resourceSlots = vsResources.data();
|
||||||
vsInfo.outputMask = 0x3;
|
vsInfo.outputMask = 0x3;
|
||||||
@ -178,6 +189,8 @@ namespace dxvk::hud {
|
|||||||
|
|
||||||
DxvkShaderCreateInfo fsInfo;
|
DxvkShaderCreateInfo fsInfo;
|
||||||
fsInfo.stage = VK_SHADER_STAGE_FRAGMENT_BIT;
|
fsInfo.stage = VK_SHADER_STAGE_FRAGMENT_BIT;
|
||||||
|
fsInfo.bindingCount = fsBindings.size();
|
||||||
|
fsInfo.bindings = fsBindings.data();
|
||||||
fsInfo.resourceSlotCount = fsResources.size();
|
fsInfo.resourceSlotCount = fsResources.size();
|
||||||
fsInfo.resourceSlots = fsResources.data();
|
fsInfo.resourceSlots = fsResources.data();
|
||||||
fsInfo.inputMask = 0x3;
|
fsInfo.inputMask = 0x3;
|
||||||
@ -194,6 +207,10 @@ namespace dxvk::hud {
|
|||||||
SpirvCodeBuffer vsCode(hud_graph_vert);
|
SpirvCodeBuffer vsCode(hud_graph_vert);
|
||||||
SpirvCodeBuffer fsCode(hud_graph_frag);
|
SpirvCodeBuffer fsCode(hud_graph_frag);
|
||||||
|
|
||||||
|
const std::array<DxvkBindingInfo, 1> fsBindings = {{
|
||||||
|
{ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 0, VK_IMAGE_VIEW_TYPE_MAX_ENUM, 0, VK_ACCESS_SHADER_READ_BIT },
|
||||||
|
}};
|
||||||
|
|
||||||
const std::array<DxvkResourceSlot, 1> fsResources = {{
|
const std::array<DxvkResourceSlot, 1> fsResources = {{
|
||||||
{ 0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_IMAGE_VIEW_TYPE_MAX_ENUM },
|
{ 0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_IMAGE_VIEW_TYPE_MAX_ENUM },
|
||||||
}};
|
}};
|
||||||
@ -206,6 +223,8 @@ namespace dxvk::hud {
|
|||||||
|
|
||||||
DxvkShaderCreateInfo fsInfo;
|
DxvkShaderCreateInfo fsInfo;
|
||||||
fsInfo.stage = VK_SHADER_STAGE_FRAGMENT_BIT;
|
fsInfo.stage = VK_SHADER_STAGE_FRAGMENT_BIT;
|
||||||
|
fsInfo.bindingCount = fsBindings.size();
|
||||||
|
fsInfo.bindings = fsBindings.data();
|
||||||
fsInfo.resourceSlotCount = fsResources.size();
|
fsInfo.resourceSlotCount = fsResources.size();
|
||||||
fsInfo.resourceSlots = fsResources.data();
|
fsInfo.resourceSlots = fsResources.data();
|
||||||
fsInfo.inputMask = 0x1;
|
fsInfo.inputMask = 0x1;
|
||||||
|
Loading…
Reference in New Issue
Block a user