mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[d3d11] Remove predication-related code
This commit is contained in:
parent
e79e8b9062
commit
34e730fe41
@ -269,23 +269,6 @@ namespace dxvk {
|
|||||||
|
|
||||||
if (pPredicate && !std::exchange(s_errorShown, true))
|
if (pPredicate && !std::exchange(s_errorShown, true))
|
||||||
Logger::err("D3D11DeviceContext::SetPredication: Stub");
|
Logger::err("D3D11DeviceContext::SetPredication: Stub");
|
||||||
|
|
||||||
// TODO: Figure out why this breaks Watch Dogs and crashes War Thunder
|
|
||||||
// if (!m_device->features().extConditionalRendering.conditionalRendering)
|
|
||||||
// return;
|
|
||||||
|
|
||||||
// EmitCs([
|
|
||||||
// cPredicate = Com<D3D11Query, false>(predicate),
|
|
||||||
// cValue = PredicateValue
|
|
||||||
// ] (DxvkContext* ctx) {
|
|
||||||
// DxvkBufferSlice predSlice;
|
|
||||||
|
|
||||||
// if (cPredicate != nullptr)
|
|
||||||
// predSlice = cPredicate->GetPredicate(ctx);
|
|
||||||
|
|
||||||
// ctx->setPredicate(predSlice,
|
|
||||||
// cValue ? VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT : 0);
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3809,9 +3792,6 @@ namespace dxvk {
|
|||||||
|
|
||||||
ctx->setViewports(1, &viewport, &scissor);
|
ctx->setViewports(1, &viewport, &scissor);
|
||||||
|
|
||||||
// Reset predication
|
|
||||||
ctx->setPredicate(DxvkBufferSlice(), 0);
|
|
||||||
|
|
||||||
// Unbind indirect draw buffer
|
// Unbind indirect draw buffer
|
||||||
ctx->bindDrawBuffers(DxvkBufferSlice(), DxvkBufferSlice());
|
ctx->bindDrawBuffers(DxvkBufferSlice(), DxvkBufferSlice());
|
||||||
|
|
||||||
|
@ -1945,7 +1945,6 @@ namespace dxvk {
|
|||||||
enabled.core.features.logicOp = supported.core.features.logicOp;
|
enabled.core.features.logicOp = supported.core.features.logicOp;
|
||||||
enabled.core.features.shaderImageGatherExtended = VK_TRUE;
|
enabled.core.features.shaderImageGatherExtended = VK_TRUE;
|
||||||
enabled.core.features.variableMultisampleRate = supported.core.features.variableMultisampleRate;
|
enabled.core.features.variableMultisampleRate = supported.core.features.variableMultisampleRate;
|
||||||
enabled.extConditionalRendering.conditionalRendering = supported.extConditionalRendering.conditionalRendering;
|
|
||||||
enabled.extTransformFeedback.transformFeedback = VK_TRUE;
|
enabled.extTransformFeedback.transformFeedback = VK_TRUE;
|
||||||
enabled.extTransformFeedback.geometryStreams = VK_TRUE;
|
enabled.extTransformFeedback.geometryStreams = VK_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -212,9 +212,6 @@ namespace dxvk {
|
|||||||
ctx->endQuery(m_query[0]);
|
ctx->endQuery(m_query[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(m_predicate != nullptr))
|
|
||||||
ctx->writePredicate(DxvkBufferSlice(m_predicate), m_query[0]);
|
|
||||||
|
|
||||||
m_resetCtr.fetch_sub(1, std::memory_order_release);
|
m_resetCtr.fetch_sub(1, std::memory_order_release);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -339,21 +336,6 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DxvkBufferSlice D3D11Query::GetPredicate(DxvkContext* ctx) {
|
|
||||||
std::lock_guard<sync::Spinlock> lock(m_predicateLock);
|
|
||||||
|
|
||||||
if (unlikely(m_desc.Query != D3D11_QUERY_OCCLUSION_PREDICATE))
|
|
||||||
return DxvkBufferSlice();
|
|
||||||
|
|
||||||
if (unlikely(m_predicate != nullptr)) {
|
|
||||||
m_predicate = CreatePredicateBuffer();
|
|
||||||
ctx->writePredicate(DxvkBufferSlice(m_predicate), m_query[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return DxvkBufferSlice(m_predicate);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
UINT64 D3D11Query::GetTimestampQueryFrequency() const {
|
UINT64 D3D11Query::GetTimestampQueryFrequency() const {
|
||||||
Rc<DxvkDevice> device = m_device->GetDXVKDevice();
|
Rc<DxvkDevice> device = m_device->GetDXVKDevice();
|
||||||
Rc<DxvkAdapter> adapter = device->adapter();
|
Rc<DxvkAdapter> adapter = device->adapter();
|
||||||
@ -371,19 +353,4 @@ namespace dxvk {
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Rc<DxvkBuffer> D3D11Query::CreatePredicateBuffer() {
|
|
||||||
Rc<DxvkDevice> device = m_device->GetDXVKDevice();
|
|
||||||
|
|
||||||
DxvkBufferCreateInfo info;
|
|
||||||
info.size = sizeof(uint32_t);
|
|
||||||
info.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT
|
|
||||||
| VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT;
|
|
||||||
info.stages = VK_PIPELINE_STAGE_TRANSFER_BIT
|
|
||||||
| VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT;
|
|
||||||
info.access = VK_ACCESS_TRANSFER_WRITE_BIT
|
|
||||||
| VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT;
|
|
||||||
return device->createBuffer(info, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -51,8 +51,6 @@ namespace dxvk {
|
|||||||
void* pData,
|
void* pData,
|
||||||
UINT GetDataFlags);
|
UINT GetDataFlags);
|
||||||
|
|
||||||
DxvkBufferSlice GetPredicate(DxvkContext* ctx);
|
|
||||||
|
|
||||||
void DoDeferredEnd() {
|
void DoDeferredEnd() {
|
||||||
m_state = D3D11_VK_QUERY_ENDED;
|
m_state = D3D11_VK_QUERY_ENDED;
|
||||||
m_resetCtr.fetch_add(1, std::memory_order_acquire);
|
m_resetCtr.fetch_add(1, std::memory_order_acquire);
|
||||||
@ -106,9 +104,6 @@ namespace dxvk {
|
|||||||
std::array<Rc<DxvkGpuQuery>, MaxGpuQueries> m_query;
|
std::array<Rc<DxvkGpuQuery>, MaxGpuQueries> m_query;
|
||||||
std::array<Rc<DxvkGpuEvent>, MaxGpuEvents> m_event;
|
std::array<Rc<DxvkGpuEvent>, MaxGpuEvents> m_event;
|
||||||
|
|
||||||
sync::Spinlock m_predicateLock;
|
|
||||||
Rc<DxvkBuffer> m_predicate;
|
|
||||||
|
|
||||||
D3D10Query m_d3d10;
|
D3D10Query m_d3d10;
|
||||||
|
|
||||||
uint32_t m_stallMask = 0;
|
uint32_t m_stallMask = 0;
|
||||||
@ -118,8 +113,6 @@ namespace dxvk {
|
|||||||
|
|
||||||
UINT64 GetTimestampQueryFrequency() const;
|
UINT64 GetTimestampQueryFrequency() const;
|
||||||
|
|
||||||
Rc<DxvkBuffer> CreatePredicateBuffer();
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user