Skip to content

Commit

Permalink
use shaders_debug_dump instead of shaders for dump storage (prevent o…
Browse files Browse the repository at this point in the history
…verwriting package in hide)
  • Loading branch information
ncannasse committed Jan 17, 2025
1 parent 4f39b77 commit 525dd60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hxsl/Cache.hx
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ class Cache {
#if shader_debug_dump
var shaderId = @:privateAccess RuntimeShader.UID;
#if ( js && !sys )
if( shaderId == 0 ) js.Syntax.code("window.shaders = [];");
js.Syntax.code("window.shaders[{0}] = '';", shaderId);
if( shaderId == 0 ) js.Syntax.code("window.shaders_debug_dump = [];");
js.Syntax.code("window.shaders_debug_dump[{0}] = '';", shaderId);
var dbg: { writeString: String->Void, close:Void->Void } = {
writeString: (str: String) -> { js.Syntax.code("window.shaders[{0}] += {1}", shaderId, str); },
writeString: (str: String) -> { js.Syntax.code("window.shaders_debug_dump[{0}] += {1}", shaderId, str); },
close: () -> {}
};
#else
Expand Down

0 comments on commit 525dd60

Please sign in to comment.