2019-12-16 04:28:01 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "d3d9_caps.h"
|
2022-07-14 14:29:52 +02:00
|
|
|
#include "d3d9_constant_buffer.h"
|
2019-12-16 04:28:01 +01:00
|
|
|
|
|
|
|
#include "../dxvk/dxvk_buffer.h"
|
|
|
|
|
|
|
|
#include "../dxso/dxso_isgn.h"
|
|
|
|
|
|
|
|
#include "../util/util_math.h"
|
|
|
|
#include "../util/util_vector.h"
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
enum class D3D9ConstantType {
|
|
|
|
Float,
|
|
|
|
Int,
|
|
|
|
Bool
|
|
|
|
};
|
|
|
|
|
|
|
|
// We make an assumption later based on the packing of this struct for copying.
|
|
|
|
struct D3D9ShaderConstantsVSSoftware {
|
|
|
|
Vector4i iConsts[caps::MaxOtherConstantsSoftware];
|
2021-09-10 00:15:15 +02:00
|
|
|
Vector4 fConsts[caps::MaxFloatConstantsSoftware];
|
2019-12-16 04:28:01 +01:00
|
|
|
uint32_t bConsts[caps::MaxOtherConstantsSoftware / 32];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct D3D9ShaderConstantsVSHardware {
|
|
|
|
Vector4i iConsts[caps::MaxOtherConstants];
|
2021-09-10 00:15:15 +02:00
|
|
|
Vector4 fConsts[caps::MaxFloatConstantsVS];
|
2019-12-16 04:28:01 +01:00
|
|
|
uint32_t bConsts[1];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct D3D9ShaderConstantsPS {
|
|
|
|
Vector4i iConsts[caps::MaxOtherConstants];
|
2021-09-10 00:15:15 +02:00
|
|
|
Vector4 fConsts[caps::MaxFloatConstantsPS];
|
2019-12-16 04:28:01 +01:00
|
|
|
uint32_t bConsts[1];
|
|
|
|
};
|
|
|
|
|
2021-09-08 23:33:23 +02:00
|
|
|
struct D3D9SwvpConstantBuffers {
|
2022-07-14 15:31:29 +02:00
|
|
|
D3D9ConstantBuffer intBuffer;
|
|
|
|
D3D9ConstantBuffer boolBuffer;
|
2021-09-08 23:33:23 +02:00
|
|
|
};
|
|
|
|
|
2019-12-16 04:28:01 +01:00
|
|
|
struct D3D9ConstantSets {
|
2022-07-14 15:31:29 +02:00
|
|
|
D3D9SwvpConstantBuffers swvp;
|
2022-07-14 14:29:52 +02:00
|
|
|
D3D9ConstantBuffer buffer;
|
2020-02-05 17:07:08 +01:00
|
|
|
DxsoShaderMetaInfo meta = {};
|
2019-12-16 04:28:01 +01:00
|
|
|
bool dirty = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|