mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
[dxvk] Get rid of validateCompute/GraphicsState
After all this time we haven't found a single situation where we need more validation, so scrap it. Checking whether there is an active render pass was redundant anyway.
This commit is contained in:
parent
a93dd74f71
commit
8dfdda7a39
@ -1432,7 +1432,7 @@ namespace dxvk {
|
|||||||
uint32_t z) {
|
uint32_t z) {
|
||||||
this->commitComputeState();
|
this->commitComputeState();
|
||||||
|
|
||||||
if (this->validateComputeState()) {
|
if (m_cpActivePipeline) {
|
||||||
this->commitComputeInitBarriers();
|
this->commitComputeInitBarriers();
|
||||||
|
|
||||||
m_queryManager.beginQueries(m_cmd,
|
m_queryManager.beginQueries(m_cmd,
|
||||||
@ -1460,7 +1460,7 @@ namespace dxvk {
|
|||||||
if (m_execBarriers.isBufferDirty(bufferSlice, DxvkAccess::Read))
|
if (m_execBarriers.isBufferDirty(bufferSlice, DxvkAccess::Read))
|
||||||
m_execBarriers.recordCommands(m_cmd);
|
m_execBarriers.recordCommands(m_cmd);
|
||||||
|
|
||||||
if (this->validateComputeState()) {
|
if (m_cpActivePipeline) {
|
||||||
this->commitComputeInitBarriers();
|
this->commitComputeInitBarriers();
|
||||||
|
|
||||||
m_queryManager.beginQueries(m_cmd,
|
m_queryManager.beginQueries(m_cmd,
|
||||||
@ -1495,7 +1495,7 @@ namespace dxvk {
|
|||||||
uint32_t firstInstance) {
|
uint32_t firstInstance) {
|
||||||
this->commitGraphicsState(false);
|
this->commitGraphicsState(false);
|
||||||
|
|
||||||
if (this->validateGraphicsState()) {
|
if (m_gpActivePipeline) {
|
||||||
m_cmd->cmdDraw(
|
m_cmd->cmdDraw(
|
||||||
vertexCount, instanceCount,
|
vertexCount, instanceCount,
|
||||||
firstVertex, firstInstance);
|
firstVertex, firstInstance);
|
||||||
@ -1513,7 +1513,7 @@ namespace dxvk {
|
|||||||
uint32_t stride) {
|
uint32_t stride) {
|
||||||
this->commitGraphicsState(false);
|
this->commitGraphicsState(false);
|
||||||
|
|
||||||
if (this->validateGraphicsState()) {
|
if (m_gpActivePipeline) {
|
||||||
auto descriptor = m_state.id.argBuffer.getDescriptor();
|
auto descriptor = m_state.id.argBuffer.getDescriptor();
|
||||||
|
|
||||||
m_cmd->cmdDrawIndirect(
|
m_cmd->cmdDrawIndirect(
|
||||||
@ -1536,7 +1536,7 @@ namespace dxvk {
|
|||||||
uint32_t stride) {
|
uint32_t stride) {
|
||||||
this->commitGraphicsState(false);
|
this->commitGraphicsState(false);
|
||||||
|
|
||||||
if (this->validateGraphicsState()) {
|
if (m_gpActivePipeline) {
|
||||||
auto argDescriptor = m_state.id.argBuffer.getDescriptor();
|
auto argDescriptor = m_state.id.argBuffer.getDescriptor();
|
||||||
auto cntDescriptor = m_state.id.cntBuffer.getDescriptor();
|
auto cntDescriptor = m_state.id.cntBuffer.getDescriptor();
|
||||||
|
|
||||||
@ -1563,7 +1563,7 @@ namespace dxvk {
|
|||||||
uint32_t firstInstance) {
|
uint32_t firstInstance) {
|
||||||
this->commitGraphicsState(true);
|
this->commitGraphicsState(true);
|
||||||
|
|
||||||
if (this->validateGraphicsState()) {
|
if (m_gpActivePipeline) {
|
||||||
m_cmd->cmdDrawIndexed(
|
m_cmd->cmdDrawIndexed(
|
||||||
indexCount, instanceCount,
|
indexCount, instanceCount,
|
||||||
firstIndex, vertexOffset,
|
firstIndex, vertexOffset,
|
||||||
@ -1582,7 +1582,7 @@ namespace dxvk {
|
|||||||
uint32_t stride) {
|
uint32_t stride) {
|
||||||
this->commitGraphicsState(true);
|
this->commitGraphicsState(true);
|
||||||
|
|
||||||
if (this->validateGraphicsState()) {
|
if (m_gpActivePipeline) {
|
||||||
auto descriptor = m_state.id.argBuffer.getDescriptor();
|
auto descriptor = m_state.id.argBuffer.getDescriptor();
|
||||||
|
|
||||||
m_cmd->cmdDrawIndexedIndirect(
|
m_cmd->cmdDrawIndexedIndirect(
|
||||||
@ -1605,7 +1605,7 @@ namespace dxvk {
|
|||||||
uint32_t stride) {
|
uint32_t stride) {
|
||||||
this->commitGraphicsState(true);
|
this->commitGraphicsState(true);
|
||||||
|
|
||||||
if (this->validateGraphicsState()) {
|
if (m_gpActivePipeline) {
|
||||||
auto argDescriptor = m_state.id.argBuffer.getDescriptor();
|
auto argDescriptor = m_state.id.argBuffer.getDescriptor();
|
||||||
auto cntDescriptor = m_state.id.cntBuffer.getDescriptor();
|
auto cntDescriptor = m_state.id.cntBuffer.getDescriptor();
|
||||||
|
|
||||||
@ -1630,7 +1630,7 @@ namespace dxvk {
|
|||||||
uint32_t counterBias) {
|
uint32_t counterBias) {
|
||||||
this->commitGraphicsState(false);
|
this->commitGraphicsState(false);
|
||||||
|
|
||||||
if (this->validateGraphicsState()) {
|
if (m_gpActivePipeline) {
|
||||||
auto physSlice = counterBuffer.getSliceHandle();
|
auto physSlice = counterBuffer.getSliceHandle();
|
||||||
|
|
||||||
m_cmd->cmdDrawIndirectVertexCount(1, 0,
|
m_cmd->cmdDrawIndirectVertexCount(1, 0,
|
||||||
@ -4017,17 +4017,6 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool DxvkContext::validateComputeState() {
|
|
||||||
return m_cpActivePipeline != VK_NULL_HANDLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool DxvkContext::validateGraphicsState() {
|
|
||||||
return m_gpActivePipeline != VK_NULL_HANDLE
|
|
||||||
&& m_flags.test(DxvkContextFlag::GpRenderPassBound);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DxvkContext::commitComputeState() {
|
void DxvkContext::commitComputeState() {
|
||||||
if (m_flags.test(DxvkContextFlag::GpRenderPassBound))
|
if (m_flags.test(DxvkContextFlag::GpRenderPassBound))
|
||||||
this->spillRenderPass();
|
this->spillRenderPass();
|
||||||
|
@ -1154,9 +1154,6 @@ namespace dxvk {
|
|||||||
void updatePushConstants(
|
void updatePushConstants(
|
||||||
VkPipelineBindPoint bindPoint);
|
VkPipelineBindPoint bindPoint);
|
||||||
|
|
||||||
bool validateComputeState();
|
|
||||||
bool validateGraphicsState();
|
|
||||||
|
|
||||||
void commitComputeState();
|
void commitComputeState();
|
||||||
void commitGraphicsState(bool indexed);
|
void commitGraphicsState(bool indexed);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user