1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 10:24:12 +01:00

[d3d10] Implement (VS|GS|PS)(Set|Get)ConstantBuffers

This commit is contained in:
Philip Rebohle 2018-08-11 20:24:58 +02:00
parent 753769aee4
commit 7f357217b9
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -656,7 +656,15 @@ namespace dxvk {
UINT StartSlot,
UINT NumBuffers,
ID3D10Buffer* const* ppConstantBuffers) {
Logger::err("D3D10Device::VSSetConstantBuffers: Not implemented");
ID3D11Buffer* d3d11Buffers[D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT];
for (uint32_t i = 0; i < NumBuffers; i++) {
d3d11Buffers[i] = ppConstantBuffers && ppConstantBuffers[i]
? static_cast<D3D10Buffer*>(ppConstantBuffers[i])->GetD3D11Iface()
: nullptr;
}
m_context->VSSetConstantBuffers(StartSlot, NumBuffers, d3d11Buffers);
}
@ -686,7 +694,14 @@ namespace dxvk {
UINT StartSlot,
UINT NumBuffers,
ID3D10Buffer** ppConstantBuffers) {
Logger::err("D3D10Device::VSGetConstantBuffers: Not implemented");
ID3D11Buffer* d3d11Buffers[D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT];
m_context->VSGetConstantBuffers(StartSlot, NumBuffers, d3d11Buffers);
for (uint32_t i = 0; i < NumBuffers; i++) {
ppConstantBuffers[i] = d3d11Buffers[i]
? static_cast<D3D11Buffer*>(d3d11Buffers[i])->GetD3D10Iface()
: nullptr;
}
}
@ -716,7 +731,15 @@ namespace dxvk {
UINT StartSlot,
UINT NumBuffers,
ID3D10Buffer* const* ppConstantBuffers) {
Logger::err("D3D10Device::GSSetConstantBuffers: Not implemented");
ID3D11Buffer* d3d11Buffers[D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT];
for (uint32_t i = 0; i < NumBuffers; i++) {
d3d11Buffers[i] = ppConstantBuffers && ppConstantBuffers[i]
? static_cast<D3D10Buffer*>(ppConstantBuffers[i])->GetD3D11Iface()
: nullptr;
}
m_context->GSSetConstantBuffers(StartSlot, NumBuffers, d3d11Buffers);
}
@ -746,7 +769,14 @@ namespace dxvk {
UINT StartSlot,
UINT NumBuffers,
ID3D10Buffer** ppConstantBuffers) {
Logger::err("D3D10Device::GSGetConstantBuffers: Not implemented");
ID3D11Buffer* d3d11Buffers[D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT];
m_context->GSGetConstantBuffers(StartSlot, NumBuffers, d3d11Buffers);
for (uint32_t i = 0; i < NumBuffers; i++) {
ppConstantBuffers[i] = d3d11Buffers[i]
? static_cast<D3D11Buffer*>(d3d11Buffers[i])->GetD3D10Iface()
: nullptr;
}
}
@ -776,7 +806,15 @@ namespace dxvk {
UINT StartSlot,
UINT NumBuffers,
ID3D10Buffer* const* ppConstantBuffers) {
Logger::err("D3D10Device::PSSetConstantBuffers: Not implemented");
ID3D11Buffer* d3d11Buffers[D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT];
for (uint32_t i = 0; i < NumBuffers; i++) {
d3d11Buffers[i] = ppConstantBuffers && ppConstantBuffers[i]
? static_cast<D3D10Buffer*>(ppConstantBuffers[i])->GetD3D11Iface()
: nullptr;
}
m_context->PSSetConstantBuffers(StartSlot, NumBuffers, d3d11Buffers);
}
@ -806,7 +844,14 @@ namespace dxvk {
UINT StartSlot,
UINT NumBuffers,
ID3D10Buffer** ppConstantBuffers) {
Logger::err("D3D10Device::PSGetConstantBuffers: Not implemented");
ID3D11Buffer* d3d11Buffers[D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT];
m_context->PSGetConstantBuffers(StartSlot, NumBuffers, d3d11Buffers);
for (uint32_t i = 0; i < NumBuffers; i++) {
ppConstantBuffers[i] = d3d11Buffers[i]
? static_cast<D3D11Buffer*>(d3d11Buffers[i])->GetD3D10Iface()
: nullptr;
}
}