mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[d3d9] Don't upload buffers before Up draws
This commit is contained in:
parent
f83ba898af
commit
62d64bd63a
@ -2615,7 +2615,7 @@ namespace dxvk {
|
||||
if (unlikely(!PrimitiveCount))
|
||||
return S_OK;
|
||||
|
||||
PrepareDraw(PrimitiveType);
|
||||
PrepareDraw(PrimitiveType, true);
|
||||
|
||||
EmitCs([this,
|
||||
cPrimType = PrimitiveType,
|
||||
@ -2652,7 +2652,7 @@ namespace dxvk {
|
||||
if (unlikely(!PrimitiveCount))
|
||||
return S_OK;
|
||||
|
||||
PrepareDraw(PrimitiveType);
|
||||
PrepareDraw(PrimitiveType, true);
|
||||
|
||||
EmitCs([this,
|
||||
cPrimType = PrimitiveType,
|
||||
@ -2688,7 +2688,7 @@ namespace dxvk {
|
||||
if (unlikely(!PrimitiveCount))
|
||||
return S_OK;
|
||||
|
||||
PrepareDraw(PrimitiveType);
|
||||
PrepareDraw(PrimitiveType, false);
|
||||
|
||||
uint32_t vertexCount = GetVertexCount(PrimitiveType, PrimitiveCount);
|
||||
|
||||
@ -2740,7 +2740,7 @@ namespace dxvk {
|
||||
if (unlikely(!PrimitiveCount))
|
||||
return S_OK;
|
||||
|
||||
PrepareDraw(PrimitiveType);
|
||||
PrepareDraw(PrimitiveType, false);
|
||||
|
||||
uint32_t vertexCount = GetVertexCount(PrimitiveType, PrimitiveCount);
|
||||
|
||||
@ -2827,7 +2827,7 @@ namespace dxvk {
|
||||
D3D9CommonBuffer* dst = static_cast<D3D9VertexBuffer*>(pDestBuffer)->GetCommonBuffer();
|
||||
D3D9VertexDecl* decl = static_cast<D3D9VertexDecl*> (pVertexDecl);
|
||||
|
||||
PrepareDraw(D3DPT_FORCE_DWORD);
|
||||
PrepareDraw(D3DPT_FORCE_DWORD, true);
|
||||
|
||||
if (decl == nullptr) {
|
||||
DWORD FVF = dst->Desc()->FVF;
|
||||
@ -6454,7 +6454,7 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void D3D9DeviceEx::PrepareDraw(D3DPRIMITIVETYPE PrimitiveType) {
|
||||
void D3D9DeviceEx::PrepareDraw(D3DPRIMITIVETYPE PrimitiveType, bool UploadBuffers) {
|
||||
if (unlikely(m_activeHazardsRT != 0 || m_activeHazardsDS != 0))
|
||||
MarkRenderHazards();
|
||||
|
||||
@ -6467,7 +6467,7 @@ namespace dxvk {
|
||||
|
||||
for (uint32_t i = 0; i < caps::MaxStreams; i++) {
|
||||
auto* vbo = GetCommonBuffer(m_state.vertexBuffers[i].vertexBuffer);
|
||||
if (vbo != nullptr && vbo->NeedsUpload())
|
||||
if (vbo != nullptr && vbo->NeedsUpload() && UploadBuffers)
|
||||
FlushBuffer(vbo);
|
||||
}
|
||||
|
||||
@ -6483,7 +6483,7 @@ namespace dxvk {
|
||||
GenerateTextureMips(texturesToGen);
|
||||
|
||||
auto* ibo = GetCommonBuffer(m_state.indices);
|
||||
if (ibo != nullptr && ibo->NeedsUpload())
|
||||
if (ibo != nullptr && ibo->NeedsUpload() && UploadBuffers)
|
||||
FlushBuffer(ibo);
|
||||
|
||||
UpdateFog();
|
||||
|
@ -895,7 +895,7 @@ namespace dxvk {
|
||||
|
||||
uint32_t GetInstanceCount() const;
|
||||
|
||||
void PrepareDraw(D3DPRIMITIVETYPE PrimitiveType);
|
||||
void PrepareDraw(D3DPRIMITIVETYPE PrimitiveType, bool UploadBuffers);
|
||||
|
||||
template <DxsoProgramType ShaderStage>
|
||||
void BindShader(
|
||||
|
Loading…
x
Reference in New Issue
Block a user