Expected Behaviour
I've used multiple vertex -> fragment outputs before with simpler data structures, but my attempt to pass two &mut Struct seem to be failing with conflicting output locations.
Example & Steps To Reproduce
Relevant source code:
pubstructBlinnPhongMaterialData{pubalbedo:Vec4,pubspecular_color:Vec4,pubshininess:f32,pubspecular_strength:f32,}pubstructBlinnPhongVertexData{pubposition:Vec4,pubnormal:Vec4,pubview_dir:Vec4,}#[spirv(vertex)]#[scene_descriptors]pubfnblinn_phong_material_vert(#[camera]cameras:&[Camera],#[instance_data]instance_data:&[InstanceData],#[material_data]material_data:&[BlinnPhongMaterialData],#[spirv(instance_index)]instance_index:usize,// vertvertex:PositionNormal,// outputsout_vertex:&mutBlinnPhongVertexData,out_material:&mutBlinnPhongMaterialData,#[spirv(position)]out_pos:&mutVec4,){// Irrelevant body, occurs even when fully commented out}#[spirv(fragment)]#[scene_descriptors]pubfnblinn_phong_material_frag(#[framebuffer_info]framebuffer_info:&FramebufferInfo,#[ambient_lights]ambient_lights:&[AmbientLight],#[directional_lights]directional_lights:&[DirectionalLight],#[point_lights]point_lights:&[PointLight],#[spot_lights]spot_lights:&[SpotLight],// outputsvertex:BlinnPhongVertexData,#[spirv(flat)]material:BlinnPhongMaterialData,// fragfrag_color:&mutVec4,){// Irrelevant}System Info
- RustGpu - main
e97524f6b4816056b3edaa70c3e0e0c656392c05 - Rust:
rustc 1.90.0-nightly (35f603652 2025-06-29) - OS:
fedora - GPU:
NVIDIA RTX 4090 - SPIR-V:
SPIRV-Tools v2025.4 v2025.4-0-g7f2d9ee9
Backtrace
error: failed to run custom build command for `rtd_scene v0.1.0 (/home/marios/proj/rtd/packages/rtd_scene)`
Caused by:
process didn't exit successfully: `/home/marios/proj/rtd/target/debug/build/rtd_scene-c5f6f38c7d3a83ba/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=RUSTGPU_CODEGEN_ARGS
cargo:rerun-if-env-changed=RUSTGPU_RUSTFLAGS
cargo:rerun-if-env-changed=RUSTGPU_CARGOFLAGS
--- stderr
Compiling rtd_scene_shaders v0.1.0 (/home/marios/proj/rtd/packages/rtd_scene_shaders)
error: [VUID-StandaloneSpirv-OpEntryPoint-08722] Entry-point has conflicting output location assignment at location 1, component 0
|
= note: module `/home/marios/proj/rtd/target/spirv-builder/spirv-unknown-vulkan1.2/release/deps/rtd_scene_shaders.spv`
warning: an unknown error occurred
|
= note: spirv-opt failed, leaving as unoptimized
= note: module `/home/marios/proj/rtd/target/spirv-builder/spirv-unknown-vulkan1.2/release/deps/rtd_scene_shaders.spv`
error: error:0:0 - [VUID-StandaloneSpirv-OpEntryPoint-08722] Entry-point has conflicting output location assignment at location 1, component 0
OpEntryPoint Vertex %2 "materials::blinn_phong_material::blinn_phong_material_vert" %cameras %instance_data %material_data %instance_index %vertex %out_material %out_vertex %out_pos
|
= note: spirv-val failed
= note: module `/home/marios/proj/rtd/target/spirv-builder/spirv-unknown-vulkan1.2/release/deps/rtd_scene_shaders.spv`
warning: `rtd_scene_shaders` (lib) generated 1 warning
error: could not compile `rtd_scene_shaders` (lib) due to 2 previous errors; 1 warning emitted
Error: BuildFailed
Expected Behaviour
I've used multiple vertex -> fragment outputs before with simpler data structures, but my attempt to pass two
&mut Structseem to be failing withconflicting output locations.Example & Steps To Reproduce
Relevant source code:
System Info
e97524f6b4816056b3edaa70c3e0e0c656392c05rustc 1.90.0-nightly (35f603652 2025-06-29)fedoraNVIDIA RTX 4090SPIRV-Tools v2025.4 v2025.4-0-g7f2d9ee9Backtrace