mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 07:29:17 +01:00
[d3d9] Do implicit discard when locking system memory resources
This commit is contained in:
parent
98c7da805b
commit
b28a7353bb
@ -4004,7 +4004,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
if (alloced)
|
if (alloced)
|
||||||
std::memset(physSlice.mapPtr, 0, physSlice.length);
|
std::memset(physSlice.mapPtr, 0, physSlice.length);
|
||||||
else if (managed && !skipWait) {
|
else if ((managed || systemmem) && !skipWait) {
|
||||||
if (!WaitForResource(mappedBuffer, D3DLOCK_DONOTWAIT)) {
|
if (!WaitForResource(mappedBuffer, D3DLOCK_DONOTWAIT)) {
|
||||||
// if the mapped buffer is currently being copied to image
|
// if the mapped buffer is currently being copied to image
|
||||||
// we can just avoid a stall by allocating a new slice and copying the existing contents
|
// we can just avoid a stall by allocating a new slice and copying the existing contents
|
||||||
@ -4350,7 +4350,7 @@ namespace dxvk {
|
|||||||
quickRead ||
|
quickRead ||
|
||||||
(boundsCheck && !pResource->DirtyRange().Overlaps(pResource->LockRange()));
|
(boundsCheck && !pResource->DirtyRange().Overlaps(pResource->LockRange()));
|
||||||
if (!skipWait) {
|
if (!skipWait) {
|
||||||
if (IsPoolManaged(desc.Pool)) {
|
if (IsPoolManaged(desc.Pool) || desc.Pool == D3DPOOL_SYSTEMMEM) {
|
||||||
if (!WaitForResource(mappingBuffer, D3DLOCK_DONOTWAIT)) {
|
if (!WaitForResource(mappingBuffer, D3DLOCK_DONOTWAIT)) {
|
||||||
// if the mapped buffer is currently being copied to the primary buffer
|
// if the mapped buffer is currently being copied to the primary buffer
|
||||||
// we can just avoid a stall by allocating a new slice and copying the existing contents
|
// we can just avoid a stall by allocating a new slice and copying the existing contents
|
||||||
|
Loading…
x
Reference in New Issue
Block a user