vrend: Relax the GLSL ES version requirement

Commit a79e837b0d changed the GLES version
requirement of the shaders to support blitting multi-sample textures,
which is unavailable on GLES <3.1. However, the change was applied for
all shaders, resulting in faults when blitting single-sample textures
with GLES <3.1.

Require GLES 3.1 only in the shaders for multi-sample textures, which
are guarded with the feature detection.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
macos/master
Akihiko Odaki 3 years ago
parent 38963aeb0a
commit 49b729dd84
  1. 15
      src/vrend_blitter.h

@ -35,6 +35,12 @@
"%s" \ "%s" \
#define FS_HEADER_GLES \ #define FS_HEADER_GLES \
"#version 300 es\n" \
"// Blitter\n" \
"%s" \
"precision mediump float;\n" \
#define FS_HEADER_GLES_MS \
"#version 310 es\n" \ "#version 310 es\n" \
"// Blitter\n" \ "// Blitter\n" \
"%s" \ "%s" \
@ -52,6 +58,11 @@
"// Blitter\n" \ "// Blitter\n" \
#define HEADER_GLES \ #define HEADER_GLES \
"#version 300 es\n" \
"// Blitter\n" \
"precision mediump float;\n" \
#define HEADER_GLES_MS \
"#version 310 es\n" \ "#version 310 es\n" \
"// Blitter\n" \ "// Blitter\n" \
"precision mediump float;\n" \ "precision mediump float;\n" \
@ -114,7 +125,7 @@
"}\n" "}\n"
#define FS_TEXFETCH_COL_MSAA_GL FS_HEADER_GL FS_TEXFETCH_COL_MSAA_BODY #define FS_TEXFETCH_COL_MSAA_GL FS_HEADER_GL FS_TEXFETCH_COL_MSAA_BODY
#define FS_TEXFETCH_COL_MSAA_GLES FS_HEADER_GLES FS_TEXFETCH_COL_MSAA_BODY #define FS_TEXFETCH_COL_MSAA_GLES FS_HEADER_GLES_MS FS_TEXFETCH_COL_MSAA_BODY
#define FS_TEXFETCH_COL_MSAA_ARRAY_GLES FS_HEADER_GLES_MS_ARRAY FS_TEXFETCH_COL_MSAA_BODY #define FS_TEXFETCH_COL_MSAA_ARRAY_GLES FS_HEADER_GLES_MS_ARRAY FS_TEXFETCH_COL_MSAA_BODY
#define FS_TEXFETCH_DS_BODY \ #define FS_TEXFETCH_DS_BODY \
@ -147,7 +158,7 @@ struct vrend_context;
struct vrend_resource; struct vrend_resource;
struct vrend_blit_info; struct vrend_blit_info;
#define FS_TEXFETCH_DS_MSAA_GL HEADER_GL FS_TEXFETCH_DS_MSAA_BODY #define FS_TEXFETCH_DS_MSAA_GL HEADER_GL FS_TEXFETCH_DS_MSAA_BODY
#define FS_TEXFETCH_DS_MSAA_GLES HEADER_GLES FS_TEXFETCH_DS_MSAA_BODY_GLES #define FS_TEXFETCH_DS_MSAA_GLES HEADER_GLES_MS FS_TEXFETCH_DS_MSAA_BODY_GLES
#define FS_TEXFETCH_DS_MSAA_ARRAY_GLES HEADER_GLES_MS_ARRAY FS_TEXFETCH_DS_MSAA_BODY_GLES #define FS_TEXFETCH_DS_MSAA_ARRAY_GLES HEADER_GLES_MS_ARRAY FS_TEXFETCH_DS_MSAA_BODY_GLES
/* implement blitting using OpenGL. */ /* implement blitting using OpenGL. */

Loading…
Cancel
Save