Commit Graph

33 Commits

Author SHA1 Message Date
baldurk 90c10ea1fc Handle boolean inputs in vulkan shader parameters
* We change to use VarType instead of CompType for signature parameters which
  allows us to represent different types of variables beyond just
  unsigned/signed integer and float.
2020-05-07 22:46:41 +01:00
baldurk 105f0e4e9f Fix GL handling of matrix parameters to specify :col instead of :row
* In GL matrices are also split column-wise
2020-04-24 20:51:32 +01:00
baldurk 936e6372cb Remove use of 3rdparty/ prefix from includes
* We instead always have 3rdparty/ in the relevant include search paths and rely
  on that. Each library still has its own unique base dir within 3rdparty to
  clarify where the include is coming from.
2020-03-11 18:00:53 +00:00
baldurk a98a8c49a7 Improve handling of multi-dimensional array input/outputs from shaders 2020-02-03 18:18:16 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk 14d01ff995 Remove support for serialising STL types, remove STL interop 2019-12-16 18:10:32 +00:00
baldurk bd9f4fc389 Remove use of vector/string from core project
* This also affects the drivers via interfaces e.g. IReplayDriver and some
  utility functions.
2019-12-16 18:10:31 +00:00
baldurk f68645bddc Reduce dependencies pulled in by common.h 2019-12-16 17:06:16 +00:00
baldurk ff08748238 Ensure all files have trailing new-lines and enforce with clang warning 2019-12-02 20:28:05 +00:00
baldurk 938056a67c Add support for serialising MSAA initial states on GL 2019-11-26 17:38:27 +00:00
baldurk 6971a585aa Fix compilation on 32-bit windows 2019-08-26 16:52:09 +01:00
baldurk 3b524ea7f1 Fix reflection of arrays-of-binds - textures and buffers 2019-08-26 13:22:26 +01:00
baldurk 9e68cbe59b Fix typo in unit tests 2019-08-16 19:00:40 +01:00
baldurk 0c3b827b35 Test specialization constant IDs and default values properly 2019-08-16 17:38:35 +01:00
baldurk dc660aa26c Allow building SPIR-V with debug info and check debug info in reflection 2019-08-16 17:38:35 +01:00
baldurk 3b00566ace Move GLSL reflection tests to common place for SPIR-V to use 2019-08-16 16:12:01 +01:00
baldurk 28cde37849 Add support for generating SPIR-V shaders for OpenGL
* Only a couple of these are needed - ones we might link with user shaders in a
  program
2019-06-07 18:44:13 +01:00
baldurk a27234c28c Split apart some of the SPIR-V headers
* We don't want to have glslang specific bits mixed in with general SPIR-V bits.
  This is also preparing for moving some SPIR-V structs into common code that
  can be re-used in new reflection/disassembly as well as editing.
2019-06-03 14:16:42 +01:00
tabi.katalin 2507532623 Fix GLES shader compile errors
Detected two shader compile errors while replaying GLES apps:
1. „#extension directive must occur before any non-preprocessor token” -  Fix the order of precisions and extensions in the shader code.
2. „extension 'GL_OES_texture_cube_map_array' is not supported”  - Do not add extensions if they are actually not supported. TEXTURE_CUBE_MAP_ARRAY was added to GLES 3.2 so   GL_OES_texture_cube_map_array and GL_EXT_texture_cube_map_array are no longer used.
2019-02-25 11:30:25 +00:00
baldurk 11819ed3be Refactor and clean up internal shaders to be better organised
* Split up old uber-cbuffers used for unrelated shaders into shader-specific
  cbuffers (DebugPixelCBufferData -> TexDisplayPSCBuffer / CheckerboardCBuffer /
  MeshPixelCBuffer).
* Split up HLSL files so not everything is lumped into 'debugdisplay.hlsl' but
  has separate files as appropriate.
* Use #include in GLSL and HLSL to better organise shader code together rather
  than relying on lumping files together on the C++ side.
* Renamed files like 'debugcbuffers.h' to 'hlsl_cbuffers.h'.
* Trimmed out some extensions/cruft that isn't needed in the GLSL side since we
  no longer use separable shaders.
* Combine some shaders like Outline/Checkerboard that were similar into central
  place.
2019-02-13 18:50:53 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk 04dc71ce32 Fix compilation of depth MSAA <-> Array shaders on Vulkan
* glslang doesn't like the GL_ARB_sample_shading extension
2018-08-02 18:44:31 +01:00
baldurk 296f84fb7e Change GL text rendering to be compatible with a wider set of versions
* In particular this will work with GLES 2.0
2018-07-06 22:44:26 +01:00
baldurk 487ac04d83 When generating GLES shaders without uniforms, declare precision
* This usually comes from debuguniforms.h, but if we exclude it we still need to
  declare the precision.
2018-07-06 22:44:10 +01:00
baldurk 528fa085b4 On ES when declaring a #version 100 shader, don't append the 'es' suffix 2018-02-13 21:10:09 +00:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
Janos Pantos 46a12525ef Modify shaders to be GLES compatible. 2017-03-09 19:13:21 +00:00
baldurk 21d6f41c97 Change GLSL shaders to compile at #version 150 and add #extensions
* For some #extensions we can fallback to a lesser path (or just drop
  that functionality - e.g. displaying cubemap arrays if there's no
  extension for it).
2017-01-17 16:55:26 +00:00
baldurk 030cbfde9a Batch update copyright years everywhere 2017-01-06 12:13:31 +00:00
baldurk 7e5f51cbf8 Rename spv/ folder back to glsl/ (hope this will make better history) 2016-07-22 02:44:37 +02:00
baldurk ed512a48de Remove glsl shader variants (and fix text rendering I forgot about) 2016-07-22 02:40:15 +02:00
baldurk 15d60ef6b9 Convert rest of GL shaders to use spv_ variants 2016-07-22 02:26:37 +02:00
baldurk 28645937db Use utility function for #version, #extension hoisting, "#includes", etc 2016-07-21 22:33:43 +02:00