echo shader name on build error

This commit is contained in:
jacob 2026-02-05 17:54:27 -06:00
parent 1c81be6a59
commit 9f22c9ca3a
5 changed files with 20 additions and 10 deletions

View File

@ -894,6 +894,7 @@ void M_BuildEntryPoint(WaveLaneCtx *lane)
);
OS_CommandResult cmd_result = OS_RunCommand(perm, compile_cmd);
gpu_obj->name = shader_name;
gpu_obj->output = cmd_result.output;
gpu_obj->return_code = cmd_result.code;
@ -995,7 +996,12 @@ void M_BuildEntryPoint(WaveLaneCtx *lane)
}
if (disp_obj)
{
gpu_obj_output = TrimWhitespace(disp_obj->output);
gpu_obj_output = StringF(
perm,
"%F\n%F",
FmtString(disp_obj->name),
FmtString(TrimWhitespace(disp_obj->output))
);
}
}
String embed_obj_output = Zi;

View File

@ -109,6 +109,7 @@ Struct(M_ResDir)
Struct(M_GpuObj)
{
String name;
String output;
i32 return_code;
};

View File

@ -1,17 +1,19 @@
#define P_WorldPitch 64.0
#define P_CellsPerMeter 32.0
#define P_CellsPerSqMeter (P_CellsPerMeter * P_CellsPerMeter)
#define P_TilesPerMeter 2.0
#define P_TilesPerSqMeter (V_TilesPerMeter * V_TilesPerMeter)
#define P_WorldPitch 64.0
#define P_TilesPitch (P_WorldPitch * P_TilesPerMeter)
#define P_CellsPitch (P_WorldPitch * P_CellsPerMeter)
#define P_TilesCount (P_TilesPitch * P_TilesPitch)
#define P_CellsCount (P_CellsPitch * P_TilesPitch)
////////////////////////////////////////////////////////////
//~ Tile types
#define P_TilesPitch (P_WorldPitch * P_TilesPerMeter)
#define P_TilesCount (P_TilesPitch * P_TilesPitch)
#define P_TilesXList(X) \
X(Empty) \
X(Wall) \

View File

@ -387,7 +387,7 @@ void V_TickForever(WaveLaneCtx *lane)
f32 smooth_remote_buffered_ticks_target = 2;
Vec2I32 tiles_dims = VEC2I32(P_TilesPitch, P_TilesPitch);
Vec2I32 cells_dims = VEC2I32(P_CellsPerMeter * P_WorldPitch, P_CellsPerMeter * P_WorldPitch);
Vec2I32 cells_dims = VEC2I32(P_CellsPitch, P_CellsPitch);
// Init gpu state
G_ResourceHandle gpu_tiles_res = Zi;
@ -2758,7 +2758,7 @@ void V_TickForever(WaveLaneCtx *lane)
++panel->windows_count;
++V.windows_count;
}
panel->active_window_idx = 1;
panel->active_window_idx = 2;
}
{
@ -3353,6 +3353,7 @@ void V_TickForever(WaveLaneCtx *lane)
if (window->is_prefab_window)
{
}
}
UI_PopCP(UI_TopCP());

View File

@ -18,9 +18,8 @@ Vec4 V_DryColor(Vec4 color, f32 dryness)
}
////////////////////////////////////////////////////////////
//~ Utility shaders
//~ Prepare frame
//- Prepare shade
ComputeShader2D(V_PrepareShadeCS, 8, 8)
{
V_SharedFrame frame = G_Dereference<V_SharedFrame>(V_ShaderConst_Frame)[0];
@ -39,6 +38,7 @@ ComputeShader2D(V_PrepareCellsCS, 8, 8)
V_SharedFrame frame = G_Dereference<V_SharedFrame>(V_ShaderConst_Frame)[0];
RWTexture2D<Vec4> cells = G_Dereference<Vec4>(frame.cells);
RWTexture2D<f32> drynesses = G_Dereference<f32>(frame.drynesses);
Vec2 cells_pos = SV_DispatchThreadID + 0.5;
if (all(cells_pos < countof(cells)))
{