Invalid texture U size

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5658
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Invalid texture U size

Post by BlueCrab »

kazade wrote:To clarify, this won't break any code which is using OpenGL correctly, it would only break code if it is abusing the fact that until now glEnableClientState and glDisableClientState didn't do anything, by just not calling them.

The reason we need glEnableClientState and glDisableClientState to work is that before my patch set, if you wanted to draw an object with textures, and then draw another with just colours, there was no way to disable sending of texture coordinates (for example), which could cause buffer overruns if the second object had more indices as it would try to send texture coordinates for the previous object.
That's fine then. I have no problem with breaking code that relies on buggy, incorrect behavior, as I said before.

Although, it might be nice if in the future we had some way to head off such problems. For instance, perhaps by having an alternate initialization function with some parameter to say to use newer behavior, especially if there's a way to give similar behavior as what was done in the past. Basically, allowing you to specify to initialize to a specific API revision that might have some compatibility shims in place (so, in this case, I'd imagine the compatibility shim would be that instead of assuming that all client state is disabled as OpenGL requires, it assumes that it is all enabled as it appears is currently done). Basically, my thought would be that we essentially try to "freeze" the old API in place at each release of KOS/KGL. Perhaps that seems weird, but I know that I've seen people complain when we do fix buggy behavior because they did rely on the old behavior and they then have to spend a lot of time fixing things...

I know that, for instance, OpenGL on OS X allows you to hint that you want a certain version of the OpenGL spec supported at startup, and what I'm proposing is sorta like that, but with the understanding that we don't actually fully support OpenGL in the first place and that it's more about our older revisions than older standard revisions...

Note: I haven't looked at the patches or anything in here yet. I was away all weekend, and I have a bunch of other stuff to still catch up on at this point. I'll try to take a look later in the week, so keep us all updated on any future work.
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Invalid texture U size

Post by bogglez »

kazade wrote: I can't see where dest pointer is always the same? Which lines?
I must've been mistaken, I don't see the issue anymore.
I think we can take the patches like this then. The other stuff can be fixed later..
BlueCrab seems to be a little busy recently, so if he takes long to react I'll go ahead and merge this patch set, I think.
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
kazade
Insane DCEmu
Insane DCEmu
Posts: 145
Joined: Tue May 02, 2017 3:11 pm
Has thanked: 3 times
Been thanked: 34 times

Re: Invalid texture U size

Post by kazade »

Hey, FWIW I've continued adding things to my fork here: https://github.com/Kazade/libgl/commits/master

Feel free to cherry-pick what you like, some of the stuff I'm doing there is pretty opinionated (e.g. the dynamically growing vertex buffer) so you might not want all of it :D

Just a quick question, what are the pros/cons of DMA vs Store Queues? Obviously there's a compile time flag to enable DMA, but it's not switched on by default and I wasn't sure why one is preferable to the other.
Post Reply