-
Notifications
You must be signed in to change notification settings - Fork 777
/
d3d9_format_helpers.h
54 lines (36 loc) · 1.24 KB
/
d3d9_format_helpers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#pragma once
#include "d3d9_include.h"
#include "d3d9_format.h"
#include "../dxvk/dxvk_device.h"
#include "../dxvk/dxvk_context.h"
namespace dxvk {
class D3D9FormatHelper {
public:
D3D9FormatHelper(const Rc<DxvkDevice>& device);
void Flush();
void ConvertFormat(
D3D9_CONVERSION_FORMAT_INFO conversionFormat,
const Rc<DxvkImage>& dstImage,
VkImageSubresourceLayers dstSubresource,
const Rc<DxvkBuffer>& srcBuffer);
private:
void ConvertGenericFormat(
D3D9_CONVERSION_FORMAT_INFO videoFormat,
const Rc<DxvkImage>& dstImage,
VkImageSubresourceLayers dstSubresource,
const Rc<DxvkBuffer>& srcBuffer,
VkFormat bufferFormat,
uint32_t specConstantValue);
enum BindingIds : uint32_t {
Image = 0,
Buffer = 1,
};
void InitShaders();
Rc<DxvkShader> InitShader(SpirvCodeBuffer code);
void FlushInternal();
Rc<DxvkDevice> m_device;
Rc<DxvkContext> m_context;
size_t m_transferCommands = 0;
std::array<Rc<DxvkShader>, D3D9ConversionFormat_Count> m_shaders;
};
}