1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[d3d11] Use new DxvkShader constructor for video shaders

This commit is contained in:
Philip Rebohle 2022-04-09 14:18:41 +02:00 committed by Philip Rebohle
parent 69817a84dc
commit a731f5daae

View File

@ -326,8 +326,8 @@ namespace dxvk {
D3D11ImmediateContext* pContext, D3D11ImmediateContext* pContext,
const Rc<DxvkDevice>& Device) const Rc<DxvkDevice>& Device)
: m_ctx(pContext) { : m_ctx(pContext) {
const SpirvCodeBuffer vsCode(d3d11_video_blit_vert); SpirvCodeBuffer vsCode(d3d11_video_blit_vert);
const SpirvCodeBuffer fsCode(d3d11_video_blit_frag); SpirvCodeBuffer fsCode(d3d11_video_blit_frag);
const std::array<DxvkResourceSlot, 4> fsResourceSlots = {{ const std::array<DxvkResourceSlot, 4> fsResourceSlots = {{
{ 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC }, { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC },
@ -336,17 +336,18 @@ namespace dxvk {
{ 3, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_IMAGE_VIEW_TYPE_2D }, { 3, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_IMAGE_VIEW_TYPE_2D },
}}; }};
m_vs = Device->createShader( DxvkShaderCreateInfo vsInfo;
VK_SHADER_STAGE_VERTEX_BIT, vsInfo.stage = VK_SHADER_STAGE_VERTEX_BIT;
0, nullptr, { 0u, 1u }, vsInfo.outputMask = 0x1;
vsCode); m_vs = new DxvkShader(vsInfo, std::move(vsCode));
m_fs = Device->createShader( DxvkShaderCreateInfo fsInfo;
VK_SHADER_STAGE_FRAGMENT_BIT, fsInfo.stage = VK_SHADER_STAGE_FRAGMENT_BIT;
fsResourceSlots.size(), fsInfo.resourceSlotCount = fsResourceSlots.size();
fsResourceSlots.data(), fsInfo.resourceSlots = fsResourceSlots.data();
{ 1u, 1u, 0u, 0u }, fsInfo.inputMask = 0x1;
fsCode); fsInfo.outputMask = 0x1;
m_fs = new DxvkShader(fsInfo, std::move(fsCode));
DxvkSamplerCreateInfo samplerInfo; DxvkSamplerCreateInfo samplerInfo;
samplerInfo.magFilter = VK_FILTER_LINEAR; samplerInfo.magFilter = VK_FILTER_LINEAR;