Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Sep 29, 2024
1 parent 801ab90 commit 67c5f5d
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions tools/make.js
Original file line number Diff line number Diff line change
Expand Up @@ -2514,7 +2514,7 @@ function shader_find_type(options) {
return 'metal';
}
else {
return options.shaderversion == 300 ? 'essl' : 'glsl';
return 'glsl';
}
}
else if (options.graphics === 'vulkan') {
Expand All @@ -2524,7 +2524,7 @@ function shader_find_type(options) {
return 'metal';
}
else if (options.graphics === 'opengl') {
return options.shaderversion == 300 ? 'essl' : 'glsl';
return 'glsl';
}
else if (options.graphics === 'direct3d11' || options.graphics === 'direct3d12') {
return 'd3d11';
Expand Down Expand Up @@ -2609,15 +2609,12 @@ class ShaderCompiler {
else {
let parameters = [this.type, from, to, this.temp, "iron"];
fs_ensuredir(this.temp);
if (this.options.shaderversion) {
////
if (goptions.target === "android" || goptions.target === "wasm") {
parameters.push('--version');
parameters.push(this.options.shaderversion);
}
if (options.defines) {
for (let define of options.defines) {
parameters.push('-D' + define);
}
parameters.push(300);
}
////
parameters[1] = path_resolve(parameters[1]);
parameters[2] = path_resolve(parameters[2]);
parameters[3] = path_resolve(parameters[3]);
Expand Down Expand Up @@ -2977,14 +2974,6 @@ class Project {
if (!sub.lto) {
this.lto = false;
}
if (this.shaderVersion) {
if (sub.shaderVersion && sub.shaderVersion > this.shaderVersion) {
this.shaderVersion = sub.shaderVersion;
}
}
else if (sub.shaderVersion) {
this.shaderVersion = sub.shaderVersion;
}
if (sub.icon) {
this.icon = sub.icon;
}
Expand Down Expand Up @@ -3383,7 +3372,6 @@ let goptions = {
ccompiler: 'clang',
cppcompiler: 'clang++',
arch: 'default',
shaderversion: null,
alangjs: false,
js: false,
hlslbin: false,
Expand Down Expand Up @@ -3423,10 +3411,6 @@ if (goptions.run) {
goptions.compile = true;
}

if (goptions.target === "android" || goptions.target === "wasm") {
goptions.shaderversion = 300;
}

let start = Date.now();
main();
console.log("Done in " + (Date.now() - start) + "ms.");

0 comments on commit 67c5f5d

Please sign in to comment.