Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I hate the gles.patch #590

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/gles.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ index 990e2f80..2e7842ac 100644

void main() {
diff --git a/src/host_shaders/opengl_fragment_shader.frag b/src/host_shaders/opengl_fragment_shader.frag
index 9f07df0b..2ab623af 100644
index 9f07df0b..75b708f7 100644
--- a/src/host_shaders/opengl_fragment_shader.frag
+++ b/src/host_shaders/opengl_fragment_shader.frag
@@ -1,4 +1,5 @@
Expand Down Expand Up @@ -97,9 +97,9 @@ index 9f07df0b..2ab623af 100644
- int se_x = bitfieldExtract(GPUREG_LIGHTi_SPOTDIR_LOW, 0, 13);
- int se_y = bitfieldExtract(GPUREG_LIGHTi_SPOTDIR_LOW, 16, 13);
- int se_z = bitfieldExtract(GPUREG_LIGHTi_SPOTDIR_HIGH, 0, 13);
+ int se_x = bitfieldExtract(uint(GPUREG_LIGHTi_SPOTDIR_LOW), 0, 13);
+ int se_y = bitfieldExtract(uint(GPUREG_LIGHTi_SPOTDIR_LOW), 16, 13);
+ int se_z = bitfieldExtract(uint(GPUREG_LIGHTi_SPOTDIR_HIGH), 0, 13);
+ int se_x = bitfieldExtractCompat(uint(GPUREG_LIGHTi_SPOTDIR_LOW), 0, 13);
+ int se_y = bitfieldExtractCompat(uint(GPUREG_LIGHTi_SPOTDIR_LOW), 16, 13);
+ int se_z = bitfieldExtractCompat(uint(GPUREG_LIGHTi_SPOTDIR_HIGH), 0, 13);

if ((se_x & 0x1000) == 0x1000) se_x |= 0xffffe000;
if ((se_y & 0x1000) == 0x1000) se_y |= 0xffffe000;
Expand Down
2 changes: 1 addition & 1 deletion src/core/PICA/shader_gen_glsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ std::string FragmentGenerator::getDefaultVertexShader() {
if (api == API::GLES) {
ret += R"(
#define USING_GLES 1
#define fma(a, b, c) ((a) * (b) + (c))

precision mediump int;
precision mediump float;
Expand Down Expand Up @@ -108,6 +107,7 @@ std::string FragmentGenerator::generate(const FragmentConfig& config) {
if (api == API::GLES) {
ret += R"(
#define USING_GLES 1
#define fma(a, b, c) ((a) * (b) + (c))

precision mediump int;
precision mediump float;
Expand Down
Loading