Project

General

Profile

Actions

Emulator Issues #6947

closed

Don't use GL_MAP_COHERENT_BIT in the buffer storage code path in OpenGL

Added by NeoBrainX over 10 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What's the problem? Describe what went wrong in few words.
We are lazy and use GL_MAP_COHERENT when using the buffer storage code path

What did you expect to happen instead?
Explicitly use MemoryBarriers whenever required. This theoretically allows for higher performance. Testing showed that this is not the case for the (very limited) amount of test cases, but there's on the other hand no reason why we NEED GL_MAP_COHERENT. It might be more convenient, but since we know exactly when we need to synch, doing so explicitly does no harm either.

Actions #1

Updated by degasus over 10 years ago

I don't think so, but maybe for uniform data.

neobrain: Which kind of buffer do you want to get (generally, not OpenGL):

  • write combining

  • flush cache after use

  • main memory buffer

  • staging buffer which updates a vram one

I haven't heared anything about cache invalidation, so I guess it's slower than write combining.

And for vertex+index data, which we only use once, I doubt that any vram buffer will be faster than a main memory one. So coherent will be exactly write combining + main memory based.

For uniform data, which is used by far more often than once, it may be faster to use vram. But we only use some KB of uniform data and we use them in order, so it should stay in gpu cache. -- Does coherent disable the gpu cache? --

I'm sorry if anything here is wrong as I've only guessed how gpu buffer handling works, so does it really work?

Actions #2

Updated by JMC4789 almost 10 years ago

Can this issue be closed after the recent Coherent Bit stuff?

Actions #3

Updated by NeoBrainX almost 10 years ago

  • Status changed from New to Fixed

The current code is still just doing random stuff without us actually knowing what we're doing. Alas, I suppose it works fine enough that this can be closed.

Actions

Also available in: Atom PDF