Commit Graph

737 Commits

Author SHA1 Message Date
baldurk 322c341fa2 Make it more obvious when input assembler buffers are not set. 2014-11-29 00:36:06 +00:00
baldurk 696eddaf22 Respect MSAA resolve when downcasting from HDR format. Refs #83
* This means saving to png, jpg, etc will now correctly either select the
  chosen sample, or resolve samples down before returning the data.
2014-11-28 22:52:49 +00:00
baldurk 4de6080b06 Use the right variable consistently 2014-11-28 22:26:58 +00:00
baldurk 3f89f12a8d Make sure numSlices doesn't become 0. Refs #83 2014-11-28 22:21:45 +00:00
baldurk 98856f5b62 Don't use MAX_LEVEL to calc mips for non-immutable textures
* GL_TEXTURE_MAX_LEVEL acts as a bound on the number of mips for either
  immutable or non-immutable textures. Instead for non-immutable textures
  we do the standard mip calculation and that's what's necessary for a
  "complete" texture.
2014-11-28 21:15:21 +00:00
baldurk 4a79ac8039 Move CalcNumMips to common header so GL code can access it 2014-11-28 21:12:17 +00:00
baldurk c1c6d635d9 Bugfixes for wchar_t handling 2014-11-28 21:11:49 +00:00
baldurk 35b670d37c Fetch number of active subroutine uniform locations from right place 2014-11-28 21:11:08 +00:00
baldurk 31b965c61c Fix enum typo in GL render state 2014-11-28 21:10:26 +00:00
baldurk e0a0c88972 Only fetch clip control states when available, else use default vals 2014-11-28 21:09:41 +00:00
baldurk 800751f267 Compile fixes for release, wchar_t use in crash handler 2014-11-28 15:30:06 +00:00
baldurk d5439a59a6 Compile fix for 64-bit 2014-11-28 14:18:44 +00:00
Baldur Karlsson 4b3f016cbd Merge pull request #111 from kvark/build
minor build fix for Linux
2014-11-28 07:47:00 +00:00
Dzmitry Malyshau 2cf42bd889 minor build fix for Linux 2014-11-27 21:44:34 -05:00
baldurk ea8203e160 Add backface culling overlay 2014-11-27 23:36:06 +00:00
baldurk 19d2eeb33f Handle instances when stream-out'ing an indexed mesh 2014-11-27 23:19:47 +00:00
baldurk ad352cebc3 Only apply vertexOffset when fetching input vertex data 2014-11-27 23:16:20 +00:00
baldurk c7e83dcaf2 Ignore shader op restype, and copy 32byte types literally
* This prevents e.g. copy as float modifying the data if it's actually an
  int and it evalutes to a NaN.
2014-11-27 22:24:50 +00:00
baldurk 2040a57e5d Check for new versions even if we think one is available
* This way if someone updates their install without clicking the menu item
  to clear this flag, it will still detect the update after a few days.
* (And when I forget to update which beta is latest, it will fix itself
  eventually. Oops).
2014-11-27 21:08:41 +00:00
baldurk de7cabe6f3 Don't read off end of indices buffer data if it's not big enough
* Fix for uploaded crash report.
2014-11-27 21:02:27 +00:00
baldurk 5ad5a0af49 Potentially overestimate compressed image size to avoid crashes
* I need to investigate this more. It seems that on AMD the compressed
  image size returned is the size of the whole cubemap, and then you get
  each face one-by-one. On nVidia the compressed image size is the size of
  one face, so dividing by 6 gives too little space.
* I don't know which one is standard correct, but that kind of doesn't
  matter since I probably need to query the size for maybe a 1x1 cubemap
  or a known dimension & compression format (like BC1 1 byte per pixel).
2014-11-27 19:52:26 +00:00
baldurk c22a1bb82c Handle invalid UTF-8 bytes without infinite loop 2014-11-27 19:41:17 +00:00
baldurk 3c40d9ab72 Check for functions that might not be present in renderstate apply 2014-11-27 19:37:45 +00:00
baldurk cdf9146a3e Fix typo where scope was fetched twice 2014-11-27 19:33:11 +00:00
baldurk 3efa9378cf Add compile time asserts on number of pnames, add missing pname 2014-11-27 19:30:46 +00:00
baldurk 8b4475c73d Update mesh columns properly, and use correct stage when specified 2014-11-27 19:26:29 +00:00
baldurk 0892989b4b Handle B8G8R8A8 as R8G8B8A8 in pixel history. Refs #110
* We can't create a UAV of format B8G8R8A8, so just make it R8G8B8A8 and
  let the GPU do the swizzle (everything else is exactly the same).
2014-11-27 19:03:25 +00:00
baldurk d585c25633 Slightly expand pixel history column widths
* Should make exponential float values more obvious/visible.
2014-11-27 18:50:51 +00:00
baldurk 237744a6dd Simple implementation of capturing transform feedback
* This won't work if the feedback is started before the captured frame then
  captured inside it, either by being paused or actually active across the
  SwapBuffers call.
2014-11-27 08:29:38 +00:00
baldurk d4bc4e2999 Fix R11G11B10 decode - it's a truncated half format
* ie. not just an unnormalised mantissa plus biased exponent, it has proper
  IEEE style float properties with hidden bit on the mantissa etc. So full
  decoding is necessary, contrary to what some of the docs say :(.
2014-11-27 00:49:05 +00:00
baldurk 16dd0b77f4 Move bound vertex buffers from general state to VAO state 2014-11-25 23:58:04 +00:00
baldurk 11d6ca5956 Fix a few cases that were mistakenly not calling via 'real' funcptrs 2014-11-25 22:40:56 +00:00
baldurk c79fb99434 Implement some missing query/conditional render functions 2014-11-25 22:40:38 +00:00
baldurk 3f33541132 Implement glBindFragDataLocationIndexed and glUniformSubroutines
* Note that the uniform subroutines are saved and restored by the render
  state, but they are not properly restored anywhere where we fetch &
  restore the current program. Will probably need a special helper class
  to push/pop that correctly.
2014-11-25 22:18:24 +00:00
baldurk cbc4c4cc43 Implement missing glMultiDraw functions 2014-11-25 21:43:42 +00:00
baldurk eccde9c8b6 Add glMemoryBarrierByRegion and glTextureBarrier 2014-11-25 21:17:34 +00:00
baldurk 67140ee100 Add glMinSampleShading and renderstate value 2014-11-25 21:17:33 +00:00
baldurk f4851a292a Add integer forms of glTexParameter* 2014-11-25 21:10:54 +00:00
baldurk e9320b1987 Add ARB alias for glDebugMessageInsert 2014-11-25 21:05:34 +00:00
baldurk ee5a81739b "Implement" shader/program binary functions, but don't allow them
* We want the application to pass us real GLSL shaders so we can do all
  kinds of juicy things to them. This is generally indicated by the program
  having a LINK_STATUS of FALSE or similar, and we can pretty much get that
  by just not passing through the call.
2014-11-25 21:03:38 +00:00
baldurk e6b5516776 Implement glFramebfuferParameteri 2014-11-23 19:55:10 +00:00
baldurk 56d500ffdb Implement glDrawRangeElementsBaseVertex 2014-11-23 19:39:10 +00:00
baldurk 403456a82f Add some missing hooked gl state functions
* glClipControl, glProvokingVertex, glPrimitiveRestartIndex,
  glDepthRangeIndexed, glClearDepthf
2014-11-23 19:30:23 +00:00
baldurk bdcde1b3f6 Add 2D multisampled array texture storage functions. 2014-11-23 18:37:50 +00:00
baldurk c1a5fc9a62 Implement glInvalidate* just by marking resource as GPU dirty 2014-11-23 17:06:15 +00:00
baldurk 81c7f985f3 Add glClampColor and glReadnPixels
* glClampColor doesn't have to be serialised as it only affects
  glReadPixels (which aren't serialised).
2014-11-23 16:41:44 +00:00
baldurk 841d77485c Add glActiveShaderProgram and direct glUniform* to right program 2014-11-23 16:37:23 +00:00
baldurk e3bc5bb84b Make sure to specify buffer size large enough for NULL terminator 2014-11-23 15:13:09 +00:00
baldurk 652e875db2 Bugfix - function doesn't take wchar_t* any more! 2014-11-23 15:00:12 +00:00
baldurk 2484bc8bc7 Use UTF-8 everywhere possible and only use wchar_t where required.
* This means that all APIs pass byte string types. ALL strings everywhere
  in the entire codebase must be assumed to be and treated as UTF-8 content
  not ASCII.
* Gets rid of all the horrible %hs specifiers that caused warnings on
  linux! Hooray.
* We convert to wide strings, or use wide characters, only when necessary
  to use the Win32 API. Some windows specific code will stay in wide chars
  just for convenience.
* Files are already serialised as UTF-8 strings for linux/windows binary
  compatibility, so this change doesn't break backwards compatibility.
2014-11-23 14:45:16 +00:00