Commit 507145dc authored by Joshua Ashton's avatar Joshua Ashton 🐸

[d3d9] Hook up FF shared state in fixed function code

parent 47464252
......@@ -492,6 +492,7 @@ namespace dxvk {
struct D3D9FFPixelData {
uint32_t constantBuffer = 0;
uint32_t sharedState = 0;
struct {
uint32_t textureFactor = { 0 };
......@@ -552,6 +553,8 @@ namespace dxvk {
void setupPS();
void emitPsSharedConstants();
void alphaTestPS();
bool isVS() { return m_programType == DxsoProgramType::VertexShader; }
......@@ -1827,8 +1830,29 @@ namespace dxvk {
m_resourceSlots.push_back(resource);
}
emitPsSharedConstants();
}
void D3D9FFShaderCompiler::emitPsSharedConstants() {
m_ps.sharedState = GetSharedConstants(m_module);
const uint32_t bindingId = computeResourceSlotId(
m_programType, DxsoBindingType::ConstantBuffer,
PSShared);
m_module.decorateDescriptorSet(m_ps.sharedState, 0);
m_module.decorateBinding(m_ps.sharedState, bindingId);
DxvkResourceSlot resource;
resource.slot = bindingId;
resource.type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
resource.view = VK_IMAGE_VIEW_TYPE_MAX_ENUM;
resource.access = VK_ACCESS_UNIFORM_READ_BIT;
m_resourceSlots.push_back(resource);
}
void D3D9FFShaderCompiler::alphaTestPS() {
// Alpha testing
uint32_t boolType = m_module.defBoolType();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment