baldurk
711f4aadf6
Print error first for unsupported operand, and check name is valid
...
* Got a crash report here but from the minidump can't see what's wrong.
It was debugging a compute shader which shouldn't have outputs.
2014-06-28 12:52:16 +01:00
baldurk
f0576ae431
Rename GL context to ctx to match linux
2014-06-28 12:50:19 +01:00
Baldur Karlsson
29792558e1
call Serialise_ functions, not real functions
2014-06-27 14:39:41 +01:00
Baldur Karlsson
fb7181e41e
Don't waste time making redundant copy of textures array
2014-06-27 14:39:40 +01:00
Baldur Karlsson
5e32950195
Change GLResource tuple to be three components including Context
...
* This lets us distinguish framebuffer object 1 on context A from
FBO 1 on context B.
* At the moment we assume that all shareable objects are shared between
all contexts. I think this is sensible and fairly common, but it will
break if some contexts don't share as the objects will alias.
2014-06-27 13:24:19 +01:00
Baldur Karlsson
5cb6edffb8
For VAOs, track and deduplicate redundant chunks
...
* This is really a spot optimisation but I have a feeling it might be
useful for more programs.
* If a program uses a single VAO and updates the attrib pointers/enables
and disables them, then this will prevent an unbounded number of chunks
building up pointlessly while READING and pushing into the record.
* A 'better' fix for this would be to gather pointer/enabled state as
initial contents and not tracking any of this except for in CAPFRAME,
but that isn't happening at the moment.
2014-06-27 13:13:46 +01:00
Baldur Karlsson
e5664a0838
Add global lock on all GL hook entry points
...
* This could be improved and moved further down, not all functions would
need a lock (only things modifying shared resources), but it suffices
for now.
2014-06-27 13:06:59 +01:00
Baldur Karlsson
8d44497712
Simple tracking of active context per thread
...
* Should change this to TLS
2014-06-27 13:02:12 +01:00
Baldur Karlsson
740a6c80e9
Fetch initial buffer contents for dirty resources in GL
...
* Huge hack, but it works for now...
2014-06-27 12:36:44 +01:00
Baldur Karlsson
de9fb483f0
Also pass-through glXChooseFBConfig (for SDL contexts > 3.0)
2014-06-27 11:59:01 +01:00
Baldur Karlsson
c13a230e3e
typo - use TextureRes for textures
2014-06-26 17:01:38 +01:00
Baldur Karlsson
b30314e644
fixes for hooking programs that use SDL
...
* Pass-through a few functions in glXGetProcAddress
* Hook dlopen() and redirect any attempts to open libGL.so
2014-06-26 15:19:20 +01:00
Baldur Karlsson
b21c0e62ba
Update qt creator file list
2014-06-26 15:17:38 +01:00
Baldur Karlsson
b9dd24e950
Also export glXGetProcAddressARB()
2014-06-26 11:42:30 +01:00
Baldur Karlsson
f00815818a
Include stddef.h for size_t
2014-06-26 11:42:08 +01:00
Baldur Karlsson
efa520474a
Minor optimisation to reduce recording of redundant chunks
2014-06-25 09:23:19 +01:00
Baldur Karlsson
4bb512a174
Support half-float in GetByteSize
2014-06-25 09:22:32 +01:00
Baldur Karlsson
052694d39f
Track enabled caps in the renderstate only when not capframing
2014-06-25 09:22:15 +01:00
Baldur Karlsson
dcf243ad63
Quick optimisation - detect case of glBufferData just to orphan
2014-06-24 16:00:29 +01:00
Baldur Karlsson
47ed54fa91
When capturing frame, track VAO modifications in context record
2014-06-24 16:00:28 +01:00
Baldur Karlsson
b3ac0619ba
Improve glMap() handling, handle non-invalidate case etc.
2014-06-24 16:00:28 +01:00
Baldur Karlsson
aae6208b22
Account for UNPACK_ROW_LENGTH and UNPACK_IMAGE_HEIGHT
2014-06-24 16:00:27 +01:00
Baldur Karlsson
038bcff106
GL_TEXTURE_SWIZZLE_RGBA is 4 parameters not 1
2014-06-24 16:00:26 +01:00
Baldur Karlsson
a10770defb
Handle setting datatype on records/texture data correctly
2014-06-24 16:00:26 +01:00
Baldur Karlsson
fdbced5292
glUseProgramStages should always go into pipeline record
2014-06-24 16:00:24 +01:00
Baldur Karlsson
e757f0aad6
Fix using wrong program name (parameter not valid when reading)
2014-06-24 16:00:23 +01:00
Baldur Karlsson
9441c0aa1d
glDetachShader should remove, not add the shader if unlinked
2014-06-24 16:00:23 +01:00
Baldur Karlsson
e778ad7b74
Create map for pipeline objects to store child programs
2014-06-24 16:00:22 +01:00
Baldur Karlsson
12019c3844
For now handle no program being bound, e.g. if pipeline is bound
2014-06-24 16:00:21 +01:00
Baldur Karlsson
4bcb81e294
Bump up number of texture records
2014-06-24 16:00:21 +01:00
Baldur Karlsson
c25c0dae9d
Call real, not wrapped function
2014-06-24 16:00:20 +01:00
Baldur Karlsson
0f715059c8
Return a few extension strings that programs might query for
2014-06-24 16:00:19 +01:00
Baldur Karlsson
20e045cc12
Ignore buffers that don't have a type
...
* This won't be a problem eventually as these buffers aren't referenced
so will be dropped from the log in most cases.
2014-06-24 16:00:19 +01:00
Baldur Karlsson
2357921180
Silently drop waits on non-existant syncs (from previous frames)
2014-06-24 16:00:18 +01:00
Baldur Karlsson
f53f79c2ad
Handle calls to bind 0 object (unbinding)
2014-06-24 16:00:17 +01:00
Baldur Karlsson
d0b63f6ae3
When in CAPFRAME save uniform sets to context record
...
* It was the wrong way around. When not capturing frame we save uniform
sets to the program's record, but really we shouldn't do this and we
should grab these as 'initial state' of the program resources
2014-06-24 15:46:22 +01:00
Baldur Karlsson
6e1d976a48
Return pixel format WGL extensions and add do-nothing hooks
2014-06-24 15:45:04 +01:00
Baldur Karlsson
1b5a68382c
Move find-modified-range function out of D3D11 driver to common
2014-06-24 15:44:47 +01:00
Baldur Karlsson
90ffbf6537
populate GL extensions on linux too :)
2014-06-19 16:31:44 +01:00
Baldur Karlsson
75495bda38
Set BufferRecords in the right spot, before serialising
2014-06-19 16:05:03 +01:00
Baldur Karlsson
2ac456a1d4
Check creation flags to see if it's backbuffer color, not name
2014-06-19 16:04:45 +01:00
Baldur Karlsson
fcebfb0183
Set eTextureCreate_SwapBuffer property properly
2014-06-19 16:04:34 +01:00
Baldur Karlsson
d568851994
Only look up live resource when not writing
2014-06-19 15:23:51 +01:00
Baldur Karlsson
9ef2fceba9
Intercept any DrawBuffers enums and convert GL_BACK/GL_FRONT
2014-06-19 15:23:27 +01:00
Baldur Karlsson
07e9855f0e
Call GetRealFunctions on MakeCurrent to populate extensions.
...
* Even if the app only queries some subset of extensions, we may need
more (e.g. need the DSA extensions). GetRealFunctions does a
PopulateHooks which will fill out the extensions that we need.
2014-06-19 15:23:01 +01:00
Baldur Karlsson
47e33feeb2
Create meshVAO on replay context, early out if no VB is bound
2014-06-19 15:22:21 +01:00
Baldur Karlsson
7941c3ebb3
Fixes for querying things out of cubemaps
2014-06-19 13:43:47 +01:00
Baldur Karlsson
c9d8ab2dcf
Add a few last buffer related hooks
2014-06-19 13:00:33 +01:00
Baldur Karlsson
b345b9ceb7
Hook the EXT_direct_state_access functions.
...
* Normal selector functions are implemented via these, which requires
EXT_direct_state_access to be available, but this isn't hard to work
around with some wrapper functions should that become necessary.
2014-06-19 12:05:49 +01:00
Baldur Karlsson
acb36a5308
A few more assorted functions wrapped.
...
* Also rearranged and organised the ProcessChunk() switch to match the
enum in gl_common.h for easier reference
2014-06-18 17:23:07 +01:00