667 Commits

Author SHA1 Message Date
twinaphex
4c3e0d44b8 Revert "Start using string_is_equal_memcmp and"
This reverts commit 26d6aee1eb064a533534dbc158a2085a887658aa.
2019-04-29 04:04:33 +02:00
twinaphex
26d6aee1eb Start using string_is_equal_memcmp and
string_is_equal_memcmp_fast
2019-04-28 17:23:11 +02:00
twinaphex
3e72c502a8 strlen optimizations :
- use STRLEN_CONST for constant strings, translates to sizeof
which should be computed at compile-time
- found some places where we are needlessly calling strlen two
times instead of just once
2019-04-27 04:21:10 +02:00
twinaphex
ff40ae2486 Refactor slang_preprocess.cpp - try to remove auto variables 2019-04-25 04:07:18 +02:00
twinaphex
a42b8f616f (slang reflection) Cleanups - start getting rid of most auto
variables
2019-04-25 03:54:04 +02:00
twinaphex
0bae77d199 (Shaders Vulkan/GLcore) Cleanups 2019-04-25 02:37:13 +02:00
twinaphex
15afaedaa8 (Shaders vulkan/GLcore) Simplify 2019-04-25 02:34:26 +02:00
twinaphex
e40c3ec07b (Shader Vulkan/GL core) Make code more the same 2019-04-25 01:42:56 +02:00
twinaphex
55b53929db (shader GL/Vulkan) Cleanups 2019-04-24 23:45:57 +02:00
twinaphex
604403fe90 (shader_vulkan) Simplifications - start making shader_gl_Core
and shader_vulkan more alike
2019-04-24 23:13:42 +02:00
twinaphex
e42dae928e (gl shader core) Simplifications 2019-04-24 22:20:48 +02:00
twinaphex
51a69dff44 (gl core shaders) Simplification 2019-04-24 22:10:21 +02:00
twinaphex
3225876f0b (shader_gl_core.cpp) Simplify 2019-04-24 20:25:37 +02:00
twinaphex
a60844897f (Shader GL core) Simplify some code 2019-04-24 04:24:48 +02:00
twinaphex
955a149ce9 Use config_file_read where we can assume we are reading a file 2019-04-22 01:56:24 +02:00
twinaphex
3619fae2d9 (LGTM) Silence some warnings 2019-04-13 02:15:26 +02:00
twinaphex
27928081cf Cleanups 2019-03-18 15:27:37 +01:00
Themaister
beff1144f6 Fix uniform override mistake in glcore shader stack.
glGetUniformLocation returned -1 after 0, and dropped uniforms on the
floor.
2019-03-13 18:28:05 +01:00
twinaphex
cd77093588 Reimplement gl2_get_flags to no longer be reliant on shader driver's
get flags implementation
2019-03-13 12:12:02 +01:00
twinaphex
191d0c0309 Add get_flags to GL shader interface 2019-03-13 11:21:00 +01:00
Themaister
1ba8c626ed Minor build fixes. 2019-03-09 12:42:23 +01:00
Themaister
3029f96511 Add a new "glcore" driver with slang support.
This driver should sunset the old gl2 driver, but that driver will
likely live on to support really ancient and terrible GL stacks.
All the worst legacy cruft has been ripped out, and it's almost a decent
backend now.

Requirements for slang are GL 3.2+ or GLES3.
Some shaders require features which are not directly compatible with
GLES2 or legacy GL.

This driver shares a lot of concepts from the Vulkan driver.
The slang shader stack and SPIRV-Cross are used to implement the shader
spec, and the menu shaders are also shared with Vulkan.
2019-03-09 12:30:49 +01:00
twinaphex
5102eff399 (GL) Move GL-only shader code to gl.c 2019-02-05 01:13:39 +01:00
orbea
28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
orbea
4c56167446 Convert to linux line endings. 2019-02-03 15:43:42 -08:00
twinaphex
dd366cd5c5 Revert "Simplify set_coords"
This reverts commit e10eb51f718aff5e61cf3fa91d865ebe2e21767e.
2019-02-03 18:05:14 +01:00
twinaphex
e10eb51f71 Simplify set_coords 2019-02-03 18:03:07 +01:00
twinaphex
62bea6ad11 SOme header cleanups 2019-02-02 22:02:24 +01:00
twinaphex
90f1317498 Cut down on code duplication - create gl_load_luts 2019-02-02 21:32:37 +01:00
twinaphex
6b3fad0f53 This can be removed now 2019-02-02 17:26:12 +01:00
twinaphex
7c74f0abe8 Create gl_add_lut 2019-02-02 17:25:27 +01:00
twinaphex
0abe271909 Take out some header includes 2019-01-19 23:15:48 +01:00
twinaphex
1a0d5030f9 shader_vulkan.cpp - doesn't need math.h 2019-01-19 23:02:48 +01:00
orbea
e062b98088 Remove trailing blank lines.
find . -type f -exec sed -i '${/^[[:space:]]*$/d;}' {} \+
2019-01-17 19:39:38 -08:00
twinaphex
6ca9afbd57 Silence more warnings with CXX_BUILD 2019-01-12 18:51:06 +01:00
orbea
bfc366decc Squeeze extra blank lines with cat(1).
Example:

find . -type f -iname '*.c' | while read -r i; do
  cat -s "$i" > "$i.new"
  mv "$i.new" "$i"
done
2019-01-08 11:04:58 -08:00
orbea
4bc0aacd8b Fix clang -Wreorder warnings.
gfx/drivers_shader/shader_vulkan.cpp:1109:6: warning: field 'id' will be initialized after field 'device' [-Wreorder]
   : id(move(id)),
     ^
gfx/drivers_shader/shader_vulkan.cpp:2107:4: warning: field 'device' will be initialized after field 'memory_properties' [-Wreorder]
   device(device),
   ^
2 warnings generated.
2018-12-16 16:16:07 -08:00
Themaister
124d9b57d6 Vulkan: Fix blue/red flip when using HW rendered cores with history.
Was using frontend format of BGRA8 when core was RGBA8, with blind
vkCmdCopyImage. Fix is to use the same format as core is pushing to
history buffer.
2018-12-06 11:38:30 +01:00
twinaphex
c5b9352c34 Revert "Rename some files"
This reverts commit 03a8bc9875ef4e0e942ab6d8d0d9402c4e1830fe.
2018-11-24 01:26:05 +01:00
twinaphex
03a8bc9875 Rename some files 2018-11-24 00:30:46 +01:00
twinaphex
747bf136f2 Simplify strip_parameter_pragmas 2018-11-23 23:42:33 +01:00
Twinaphex
8514d6ccc8
Revert "Fix shader warnings" 2018-11-23 04:18:38 +01:00
Alfrix
3e7328b00a Fix shader warnings 2018-11-22 16:18:11 -03:00
Themaister
3f344660c0 Remove Windows \r line endings in glslang parser. 2018-11-08 21:34:21 +01:00
Themaister
1d7dfc5f47 Fix glslang_format LUT.
Was logging wrong format names.
2018-09-01 22:46:47 +02:00
twinaphex
75a388cd67 Use strlcpy instead of strncpy in slang_process.cpp 2018-08-16 10:14:42 +02:00
Brad Parker
6de4384350 glsl: don't clear the shader source 2018-08-14 18:42:23 -04:00
twinaphex
a6941fb4ed Initial work done on VS2017 solution for Android 2018-08-14 16:02:31 +02:00
twinaphex
9c0ed0f2c4 Don't use core profile GLSL shaders for OpenGLES 2018-07-18 10:06:30 +02:00
twinaphex
6b5ade4ac3 Should be no more deprecated warnings with core context GL for menu
shaders
2018-07-12 22:03:37 +02:00