mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
VideoBackends / VideoCommon: add new uniform buffer object for custom shader materials (slot 3, geometry shader buffer moves to slot 4 if available)
This commit is contained in:
@ -91,13 +91,16 @@ public:
|
||||
m_pending.samplers[index] = sampler;
|
||||
}
|
||||
|
||||
void SetPixelConstants(ID3D11Buffer* buffer0, ID3D11Buffer* buffer1 = nullptr)
|
||||
void SetPixelConstants(ID3D11Buffer* buffer0, ID3D11Buffer* buffer1 = nullptr,
|
||||
ID3D11Buffer* buffer2 = nullptr)
|
||||
{
|
||||
if (m_current.pixelConstants[0] != buffer0 || m_current.pixelConstants[1] != buffer1)
|
||||
if (m_current.pixelConstants[0] != buffer0 || m_current.pixelConstants[1] != buffer1 ||
|
||||
m_current.pixelConstants[2] != buffer2)
|
||||
m_dirtyFlags.set(DirtyFlag_PixelConstants);
|
||||
|
||||
m_pending.pixelConstants[0] = buffer0;
|
||||
m_pending.pixelConstants[1] = buffer1;
|
||||
m_pending.pixelConstants[2] = buffer2;
|
||||
}
|
||||
|
||||
void SetVertexConstants(ID3D11Buffer* buffer)
|
||||
@ -252,7 +255,7 @@ private:
|
||||
{
|
||||
std::array<ID3D11ShaderResourceView*, VideoCommon::MAX_PIXEL_SHADER_SAMPLERS> textures;
|
||||
std::array<ID3D11SamplerState*, VideoCommon::MAX_PIXEL_SHADER_SAMPLERS> samplers;
|
||||
std::array<ID3D11Buffer*, 2> pixelConstants;
|
||||
std::array<ID3D11Buffer*, 3> pixelConstants;
|
||||
ID3D11Buffer* vertexConstants;
|
||||
ID3D11Buffer* geometryConstants;
|
||||
ID3D11Buffer* vertexBuffer;
|
||||
|
Reference in New Issue
Block a user