[Chore] (Shader/GLSL): Remove the preConvertedGlsl feature, which is useless.

This commit is contained in:
BZLZHH 2025-07-12 22:14:39 +08:00
parent 46d60c9cad
commit 98d4d51427
4 changed files with 1 additions and 2811 deletions

View File

@ -45,7 +45,7 @@ add_library(${CMAKE_PROJECT_NAME} SHARED
gl/pixel.cpp
gl/glsl/glsl_for_es.cpp
gl/glsl/cache.cpp
gl/glsl/preConvertedGlsl.cpp
gl/vertexattrib.cpp
glx/lookup.cpp
egl/egl.c

View File

@ -8,7 +8,6 @@
#include <fstream>
#include "../log.h"
#include "glslang/SPIRV/GlslangToSpv.h"
#include "preConvertedGlsl.h"
#include <string>
#include <regex>
#include <strstream>
@ -17,8 +16,6 @@
#include "cache.h"
#include "../../version.h"
//#define FEATURE_PRE_CONVERTED_GLSL
#define DEBUG 0
#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;
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);
LOG_D("Firstly converted GLSL:\n%s", correct_glsl_str.c_str())
int glsl_version = get_or_add_glsl_version(correct_glsl_str);

File diff suppressed because it is too large Load Diff

View File

@ -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