Skip to content

Commit 715e9de

Browse files
committed
buffer: switch shader from push constant to storage buffer
1 parent 5f5f49d commit 715e9de

File tree

5 files changed

+5
-5
lines changed
  • generated/graphics
    • ash
      • cargo-gpu/mygraphics-shaders/src
      • spirv-builder/mygraphics-shaders/src
    • wgpu
      • cargo-gpu/mygraphics-shaders/src
      • spirv-builder/mygraphics-shaders/src
  • graphics/mygraphics-shaders/src

5 files changed

+5
-5
lines changed

generated/graphics/ash/cargo-gpu/mygraphics-shaders/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn main_fs(vtx_color: Vec3, output: &mut Vec4) {
2323
#[spirv(vertex)]
2424
pub fn main_vs(
2525
#[spirv(vertex_index)] vert_id: i32,
26-
#[spirv(push_constant)] constants: &ShaderConstants,
26+
#[spirv(descriptor_set = 0, binding = 0, storage_buffer)] constants: &ShaderConstants,
2727
#[spirv(position)] vtx_pos: &mut Vec4,
2828
vtx_color: &mut Vec3,
2929
) {

generated/graphics/ash/spirv-builder/mygraphics-shaders/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn main_fs(vtx_color: Vec3, output: &mut Vec4) {
2323
#[spirv(vertex)]
2424
pub fn main_vs(
2525
#[spirv(vertex_index)] vert_id: i32,
26-
#[spirv(push_constant)] constants: &ShaderConstants,
26+
#[spirv(descriptor_set = 0, binding = 0, storage_buffer)] constants: &ShaderConstants,
2727
#[spirv(position)] vtx_pos: &mut Vec4,
2828
vtx_color: &mut Vec3,
2929
) {

generated/graphics/wgpu/cargo-gpu/mygraphics-shaders/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn main_fs(vtx_color: Vec3, output: &mut Vec4) {
2323
#[spirv(vertex)]
2424
pub fn main_vs(
2525
#[spirv(vertex_index)] vert_id: i32,
26-
#[spirv(push_constant)] constants: &ShaderConstants,
26+
#[spirv(descriptor_set = 0, binding = 0, storage_buffer)] constants: &ShaderConstants,
2727
#[spirv(position)] vtx_pos: &mut Vec4,
2828
vtx_color: &mut Vec3,
2929
) {

generated/graphics/wgpu/spirv-builder/mygraphics-shaders/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn main_fs(vtx_color: Vec3, output: &mut Vec4) {
2323
#[spirv(vertex)]
2424
pub fn main_vs(
2525
#[spirv(vertex_index)] vert_id: i32,
26-
#[spirv(push_constant)] constants: &ShaderConstants,
26+
#[spirv(descriptor_set = 0, binding = 0, storage_buffer)] constants: &ShaderConstants,
2727
#[spirv(position)] vtx_pos: &mut Vec4,
2828
vtx_color: &mut Vec3,
2929
) {

graphics/mygraphics-shaders/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn main_fs(vtx_color: Vec3, output: &mut Vec4) {
2323
#[spirv(vertex)]
2424
pub fn main_vs(
2525
#[spirv(vertex_index)] vert_id: i32,
26-
#[spirv(push_constant)] constants: &ShaderConstants,
26+
#[spirv(descriptor_set = 0, binding = 0, storage_buffer)] constants: &ShaderConstants,
2727
#[spirv(position)] vtx_pos: &mut Vec4,
2828
vtx_color: &mut Vec3,
2929
) {

0 commit comments

Comments
 (0)