1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +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:
Philip Rebohle 2019-07-14 19:34:56 +02:00
parent a93dd74f71
commit 8dfdda7a39
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 9 additions and 23 deletions

View File

@ -1432,7 +1432,7 @@ namespace dxvk {
uint32_t z) {
this->commitComputeState();
if (this->validateComputeState()) {
if (m_cpActivePipeline) {
this->commitComputeInitBarriers();
m_queryManager.beginQueries(m_cmd,
@ -1460,7 +1460,7 @@ namespace dxvk {
if (m_execBarriers.isBufferDirty(bufferSlice, DxvkAccess::Read))
m_execBarriers.recordCommands(m_cmd);
if (this->validateComputeState()) {
if (m_cpActivePipeline) {
this->commitComputeInitBarriers();
m_queryManager.beginQueries(m_cmd,
@ -1495,7 +1495,7 @@ namespace dxvk {
uint32_t firstInstance) {
this->commitGraphicsState(false);
if (this->validateGraphicsState()) {
if (m_gpActivePipeline) {
m_cmd->cmdDraw(
vertexCount, instanceCount,
firstVertex, firstInstance);
@ -1513,7 +1513,7 @@ namespace dxvk {
uint32_t stride) {
this->commitGraphicsState(false);
if (this->validateGraphicsState()) {
if (m_gpActivePipeline) {
auto descriptor = m_state.id.argBuffer.getDescriptor();
m_cmd->cmdDrawIndirect(
@ -1536,7 +1536,7 @@ namespace dxvk {
uint32_t stride) {
this->commitGraphicsState(false);
if (this->validateGraphicsState()) {
if (m_gpActivePipeline) {
auto argDescriptor = m_state.id.argBuffer.getDescriptor();
auto cntDescriptor = m_state.id.cntBuffer.getDescriptor();
@ -1563,7 +1563,7 @@ namespace dxvk {
uint32_t firstInstance) {
this->commitGraphicsState(true);
if (this->validateGraphicsState()) {
if (m_gpActivePipeline) {
m_cmd->cmdDrawIndexed(
indexCount, instanceCount,
firstIndex, vertexOffset,
@ -1582,7 +1582,7 @@ namespace dxvk {
uint32_t stride) {
this->commitGraphicsState(true);
if (this->validateGraphicsState()) {
if (m_gpActivePipeline) {
auto descriptor = m_state.id.argBuffer.getDescriptor();
m_cmd->cmdDrawIndexedIndirect(
@ -1605,7 +1605,7 @@ namespace dxvk {
uint32_t stride) {
this->commitGraphicsState(true);
if (this->validateGraphicsState()) {
if (m_gpActivePipeline) {
auto argDescriptor = m_state.id.argBuffer.getDescriptor();
auto cntDescriptor = m_state.id.cntBuffer.getDescriptor();
@ -1630,7 +1630,7 @@ namespace dxvk {
uint32_t counterBias) {
this->commitGraphicsState(false);
if (this->validateGraphicsState()) {
if (m_gpActivePipeline) {
auto physSlice = counterBuffer.getSliceHandle();
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() {
if (m_flags.test(DxvkContextFlag::GpRenderPassBound))
this->spillRenderPass();

View File

@ -1154,9 +1154,6 @@ namespace dxvk {
void updatePushConstants(
VkPipelineBindPoint bindPoint);
bool validateComputeState();
bool validateGraphicsState();
void commitComputeState();
void commitGraphicsState(bool indexed);