mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix: EEVEE: Missing bind in shadow_tag_update
Caused by unused resource.
This commit is contained in:
parent
bdf796e078
commit
cdccdfcd4d
2 changed files with 9 additions and 6 deletions
|
|
@ -14,6 +14,10 @@ struct TileMaps {
|
|||
[[storage(0, read_write)]] ShadowTileMapData (&tilemaps_buf)[];
|
||||
};
|
||||
|
||||
struct Tiles {
|
||||
[[storage(1, read_write)]] uint (&tiles_buf)[];
|
||||
};
|
||||
|
||||
struct Statistics {
|
||||
[[storage(7, read_write)]] ShadowStatistics &statistics_buf;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ struct TagUpdate {
|
|||
|
||||
[[push_constant]] int tilemap_count;
|
||||
|
||||
[[storage(1, read_write)]] uint (&tiles_buf)[];
|
||||
[[storage(5, read)]] const ObjectBounds (&bounds_buf)[];
|
||||
[[storage(6, read)]] const uint (&resource_ids_buf)[];
|
||||
};
|
||||
|
|
@ -105,7 +104,7 @@ void tag_update_vert([[resource_table]] TagUpdate &srt,
|
|||
}
|
||||
|
||||
[[fragment]]
|
||||
void tag_update_frag([[resource_table]] TagUpdate &srt,
|
||||
void tag_update_frag([[resource_table]] Tiles &tiles,
|
||||
[[resource_table]] TileMaps &tilemaps,
|
||||
[[frag_coord]] const float4 frag_coord,
|
||||
[[in]] const VertOut &v_out)
|
||||
|
|
@ -115,12 +114,12 @@ void tag_update_frag([[resource_table]] TagUpdate &srt,
|
|||
uint2 texel = uint2(frag_coord.xy);
|
||||
/* Tag only LOD0. The lower LOD will be written by the tag_propagate pass. */
|
||||
int tile_index = shadow_tile_offset(texel, tilemap.tiles_index, 0);
|
||||
atomicOr(srt.tiles_buf[tile_index], uint(SHADOW_DO_UPDATE));
|
||||
atomicOr(tiles.tiles_buf[tile_index], uint(SHADOW_DO_UPDATE));
|
||||
}
|
||||
|
||||
/* Propagate the LOD0 update tag to the lower LOD tiles. */
|
||||
[[compute, local_size(SHADOW_TILEMAP_RES, SHADOW_TILEMAP_RES)]]
|
||||
void tag_propagate([[resource_table]] TagUpdate &srt,
|
||||
void tag_propagate([[resource_table]] Tiles &tiles,
|
||||
[[resource_table]] TileMaps &tilemaps,
|
||||
[[global_invocation_id]] const uint3 global_id)
|
||||
{
|
||||
|
|
@ -128,13 +127,13 @@ void tag_propagate([[resource_table]] TagUpdate &srt,
|
|||
|
||||
uint2 texel = uint2(global_id.xy);
|
||||
const int tile_index_lod0 = shadow_tile_offset(texel, tilemap.tiles_index, 0);
|
||||
bool do_update = (srt.tiles_buf[tile_index_lod0] & uint(SHADOW_DO_UPDATE)) != 0;
|
||||
bool do_update = (tiles.tiles_buf[tile_index_lod0] & uint(SHADOW_DO_UPDATE)) != 0;
|
||||
|
||||
if (do_update) {
|
||||
/* TODO(fclem): Recursive downsampling. */
|
||||
for (int lod = 1; lod <= SHADOW_TILEMAP_LOD; lod++) {
|
||||
int tile_index = shadow_tile_offset(texel >> lod, tilemap.tiles_index, lod);
|
||||
atomicOr(srt.tiles_buf[tile_index], uint(SHADOW_DO_UPDATE));
|
||||
atomicOr(tiles.tiles_buf[tile_index], uint(SHADOW_DO_UPDATE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue