varjo icon indicating copy to clipboard operation
varjo copied to clipboard

Add a way to alias bindings.

Open cbaggers opened this issue 7 years ago • 1 comments

I was reading this https://timothylottes.github.io/20180316.html and i really liked this pattern.

#define SIZ_ (256*1024*1024)
layout(set=0,binding=0,std430)                    buffer ssbo0_ {uint  bufA32[SIZ_/4];};
layout(set=0,binding=0,std430)                    buffer ssbo1_ {uvec2 bufA64[SIZ_/8];};
layout(set=0,binding=0,std430)           readonly buffer ssbo2_ {uint  bufR32[SIZ_/4];};
layout(set=0,binding=0,std430)           readonly buffer ssbo3_ {uvec2 bufR64[SIZ_/8];};
layout(set=0,binding=0,std430)           readonly buffer ssbo4_ {uvec4 bufR128[SIZ_/16];};
layout(set=0,binding=0,std430) coherent writeonly buffer ssbo5_ {uint  bufW32[SIZ_/4];};
layout(set=0,binding=0,std430) coherent writeonly buffer ssbo6_ {uvec2 bufW64[SIZ_/8];};
layout(set=0,binding=0,std430) coherent writeonly buffer ssbo7_ {uvec4 bufW128[SIZ_/16];};
layout(set=0,binding=0,std430) volatile writeonly buffer ssbo8_ {uint  bufV32[SIZ_/4];};
layout(set=0,binding=0,std430) volatile writeonly buffer ssbo9_ {uvec2 bufV64[SIZ_/8];};
layout(set=0,binding=0,std430) volatile writeonly buffer ssboA_ {uvec4 bufV128[SIZ_/16];};

Currently Varjo doesnt allow this so we need to look into how we would do it.

cbaggers avatar Mar 19 '18 07:03 cbaggers

Hey, I was browsing the repository for a way to specify bindings on my uniform buffers and noticed that the link is no longer valid, so I looked it up in the way back machine.

cheers

JolifantoBambla avatar Jul 21 '21 14:07 JolifantoBambla