Comments (9)
I tested that and noticed it in fact crashes on app exit when the device is killed (wrapper's refcount is 0, underlying interface's refcount is 2)... So the question is, where do the refcounts desync?
from d3d8to9.
UPDATE: The exit crash seems to solved by re-reading the reference counter after releasing render target/depth target with myRef = InterlockedExchange(&_ref, ref);
. Thus, the initial question in the issue is valid once again.
from d3d8to9.
Was done because of the crash you mentioned and at the time this was the quickest solution.
from d3d8to9.
Something as simple as inserting this
// Obtain the reference counter after releasing surfaces again myRef = InterlockedExchange(&_ref, ref);
below proxy->Release()
seems to work great though. One could just --myRef when releasing rendertargets but I feel re-reading the actual refcount is safer.
from d3d8to9.
Technically it would be better to put it one line above the _proxy->Release()
call to keep constistent with all other Release
implementations. Should still work.
from d3d8to9.
Sure. It matters little but if consistency can be preserved, best to go for it!
from d3d8to9.
While you're here, I know it's not really related but I'm not a linkedin user and leaving a message here is probably the best - are you fine with a game specific fork of d3d8to9 maintained in a never-to-be-merged branch? Here it's about a GameMaker generated executable so we don't really have control on how d3d8 calls are issued (and there is a LOT of redundancy which cannot be easily avoided) and it'd be easiest to address from inside this dll.
from d3d8to9.
I have identified the root cause of the refcount issue (device release ended up in a would-be infinite loop only bailed from thanks to refcount underflow) and updated #2 to include the fix!
from d3d8to9.
@CookiePLMonster Sure, you can use it however you see fit as long as it follows the license.
from d3d8to9.
Related Issues (20)
- Mafia The City Lost Heaven HOT 2
- [Crash] Pro Evolution Soccer 3 HOT 2
- Max Payne - WS Fix not working HOT 3
- .
- Consider collaborating with the d8vk project? HOT 1
- Consider recommending D3DX from NuGet instead of an old DirectX SDK HOT 3
- Ballistics (2001) - Junk polygons in menus
- C:\Microsoft\Cpp\Default\props not found HOT 1
- Rome Total War - Campaign Map Texture Issue HOT 6
- D3D8.1 Pixel and Vertex Shader Lifetimes Seem To Be Incorrect HOT 1
- Problems with character models. Pangya
- Latest update crashes Silent Hill 2 in SetVertexShader() HOT 4
- v1.11.1 - Max Payne - Loading Screen Errors / Missing Sounds
- Fellowship of the Ring black screen on startup/uncapped frame rate HOT 1
- uhh
- NVCP multi sampling anti-aliasing doesn't work. I tried everything. Metin2 is the game. HOT 1
- [Suggestion] The Bard's Tale (2005) - Solve the slowness of some parts... HOT 1
- Fixing 3dwinxp screensaver working experience
- Generals Zero Hour - Many Issues and 1 Bug HOT 1
- Failed to Load d3dx9_43.dll HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3d8to9.