-
-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crashes with dxCreateTexture with pixel count+:setPixels() #287
Comments
Ohh, yeah, and which crash dump should I post? |
https://upload.mtasa.com/u/896366106/texturecreatecrash.zip_ |
Link example resource and confirm its still a thing, i'll check on that. |
When it comes to operations with textures MTA is relying on D3D9 API. But the largest texture size is 4096 × 4096 in DX9. Of course you can try to create a bigger texture but it's unsafe and can result in unpredictable consequences. |
It's not a bug. The only thing you can do is to forbid to create textures with size bigger than 4096x4096 px. |
A note for this should be added to the wiki page (regarding max texture size for D3D9). Should we enforce this limit when using |
Describe the bug
So, I was doing some random thing, and for some reason I crashed a few times.
I was using dxCreateTexture() with some big pixel counts(12k+ on x and y)+setPixels()
I crashed out every time, but I dont know exactly caused the crash, but it has something to do with the mentioned functions.
To Reproduce
Maybe:
for x = 0, math.floor(20000/32), 32 do for y = 0, math.floor(20000/32), 32 do tex:setPixels(<Add pixels here from a 32x32 image>, x, y, 32, 32) end end
This is how I crashed, or at least, it was like this.
Expected behavior
It should create the texture and set its pixels
MTA Client (please complete the following information):
MTA Server (please complete the following information):
The text was updated successfully, but these errors were encountered: