mirror of
https://github.com/MobileGL-Dev/MobileGlues.git
synced 2025-09-24 03:31:43 -04:00
[Chore] (Shader/GLSL): Remove the preConvertedGlsl
feature, which is useless.
This commit is contained in:
parent
46d60c9cad
commit
98d4d51427
@ -45,7 +45,7 @@ add_library(${CMAKE_PROJECT_NAME} SHARED
|
|||||||
gl/pixel.cpp
|
gl/pixel.cpp
|
||||||
gl/glsl/glsl_for_es.cpp
|
gl/glsl/glsl_for_es.cpp
|
||||||
gl/glsl/cache.cpp
|
gl/glsl/cache.cpp
|
||||||
gl/glsl/preConvertedGlsl.cpp
|
|
||||||
gl/vertexattrib.cpp
|
gl/vertexattrib.cpp
|
||||||
glx/lookup.cpp
|
glx/lookup.cpp
|
||||||
egl/egl.c
|
egl/egl.c
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "../log.h"
|
#include "../log.h"
|
||||||
#include "glslang/SPIRV/GlslangToSpv.h"
|
#include "glslang/SPIRV/GlslangToSpv.h"
|
||||||
#include "preConvertedGlsl.h"
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include <strstream>
|
#include <strstream>
|
||||||
@ -17,8 +16,6 @@
|
|||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
#include "../../version.h"
|
#include "../../version.h"
|
||||||
|
|
||||||
//#define FEATURE_PRE_CONVERTED_GLSL
|
|
||||||
|
|
||||||
#define DEBUG 0
|
#define DEBUG 0
|
||||||
|
|
||||||
#if !defined(__APPLE__)
|
#if !defined(__APPLE__)
|
||||||
@ -689,15 +686,6 @@ std::string spirv_to_essl(std::vector<unsigned int> spirv, uint essl_version, in
|
|||||||
|
|
||||||
static bool glslang_inited = false;
|
static bool glslang_inited = false;
|
||||||
std::string GLSLtoGLSLES_2(const char *glsl_code, GLenum glsl_type, uint essl_version, int& return_code) {
|
std::string GLSLtoGLSLES_2(const char *glsl_code, GLenum glsl_type, uint essl_version, int& return_code) {
|
||||||
#ifdef FEATURE_PRE_CONVERTED_GLSL
|
|
||||||
if (getGLSLVersion(glsl_code) == 430) {
|
|
||||||
char* converted = preConvertedGlsl(glsl_code);
|
|
||||||
if (converted) {
|
|
||||||
LOG_D("Find pre-converted glsl, now use it.")
|
|
||||||
return converted;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
std::string correct_glsl_str = preprocess_glsl(glsl_code);
|
std::string correct_glsl_str = preprocess_glsl(glsl_code);
|
||||||
LOG_D("Firstly converted GLSL:\n%s", correct_glsl_str.c_str())
|
LOG_D("Firstly converted GLSL:\n%s", correct_glsl_str.c_str())
|
||||||
int glsl_version = get_or_add_glsl_version(correct_glsl_str);
|
int glsl_version = get_or_add_glsl_version(correct_glsl_str);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,21 +0,0 @@
|
|||||||
//
|
|
||||||
// Created by BZLZHH on 2025/2/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef MOBILEGLUES_PLUGIN_PRECONVERTEDGLSL_H
|
|
||||||
#define MOBILEGLUES_PLUGIN_PRECONVERTEDGLSL_H
|
|
||||||
|
|
||||||
#include "../log.h"
|
|
||||||
#include "../mg.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
char *preConvertedGlsl(char *glsl_code);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif //MOBILEGLUES_PLUGIN_PRECONVERTEDGLSL_H
|
|
Loading…
x
Reference in New Issue
Block a user