Skip to content

Commit e216566

Browse files
feat(shader)!: make ProgrammableStage::entry_point optional
1 parent 4af1991 commit e216566

File tree

52 files changed

+152
-130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+152
-130
lines changed

benches/benches/computepass.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ impl ComputepassState {
236236
label: Some("Compute Pipeline"),
237237
layout: Some(&pipeline_layout),
238238
module: &sm,
239-
entry_point: "cs_main",
239+
entry_point: Some("cs_main"),
240240
compilation_options: wgpu::PipelineCompilationOptions::default(),
241241
cache: None,
242242
});
@@ -331,7 +331,7 @@ impl ComputepassState {
331331
label: Some("Compute Pipeline bindless"),
332332
layout: Some(&bindless_pipeline_layout),
333333
module: &bindless_sm,
334-
entry_point: "cs_main",
334+
entry_point: Some("cs_main"),
335335
compilation_options: wgpu::PipelineCompilationOptions::default(),
336336
cache: None,
337337
});

benches/benches/renderpass.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl RenderpassState {
182182
layout: Some(&pipeline_layout),
183183
vertex: wgpu::VertexState {
184184
module: &sm,
185-
entry_point: "vs_main",
185+
entry_point: Some("vs_main"),
186186
buffers: &vertex_buffer_layouts,
187187
compilation_options: wgpu::PipelineCompilationOptions::default(),
188188
},
@@ -199,7 +199,7 @@ impl RenderpassState {
199199
multisample: wgpu::MultisampleState::default(),
200200
fragment: Some(wgpu::FragmentState {
201201
module: &sm,
202-
entry_point: "fs_main",
202+
entry_point: Some("fs_main"),
203203
targets: &[Some(wgpu::ColorTargetState {
204204
format: wgpu::TextureFormat::Rgba8UnormSrgb,
205205
blend: None,
@@ -280,7 +280,7 @@ impl RenderpassState {
280280
layout: Some(&bindless_pipeline_layout),
281281
vertex: wgpu::VertexState {
282282
module: &bindless_shader_module,
283-
entry_point: "vs_main",
283+
entry_point: Some("vs_main"),
284284
buffers: &vertex_buffer_layouts,
285285
compilation_options: wgpu::PipelineCompilationOptions::default(),
286286
},
@@ -297,7 +297,7 @@ impl RenderpassState {
297297
multisample: wgpu::MultisampleState::default(),
298298
fragment: Some(wgpu::FragmentState {
299299
module: &bindless_shader_module,
300-
entry_point: "fs_main",
300+
entry_point: Some("fs_main"),
301301
targets: &[Some(wgpu::ColorTargetState {
302302
format: wgpu::TextureFormat::Rgba8UnormSrgb,
303303
blend: None,

examples/src/boids/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl crate::framework::Example for Example {
131131
layout: Some(&render_pipeline_layout),
132132
vertex: wgpu::VertexState {
133133
module: &draw_shader,
134-
entry_point: "main_vs",
134+
entry_point: Some("main_vs"),
135135
compilation_options: Default::default(),
136136
buffers: &[
137137
wgpu::VertexBufferLayout {
@@ -148,7 +148,7 @@ impl crate::framework::Example for Example {
148148
},
149149
fragment: Some(wgpu::FragmentState {
150150
module: &draw_shader,
151-
entry_point: "main_fs",
151+
entry_point: Some("main_fs"),
152152
compilation_options: Default::default(),
153153
targets: &[Some(config.view_formats[0].into())],
154154
}),
@@ -165,7 +165,7 @@ impl crate::framework::Example for Example {
165165
label: Some("Compute pipeline"),
166166
layout: Some(&compute_pipeline_layout),
167167
module: &compute_shader,
168-
entry_point: "main",
168+
entry_point: Some("main"),
169169
compilation_options: Default::default(),
170170
cache: None,
171171
});

examples/src/bunnymark/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,13 @@ impl crate::framework::Example for Example {
202202
layout: Some(&pipeline_layout),
203203
vertex: wgpu::VertexState {
204204
module: &shader,
205-
entry_point: "vs_main",
205+
entry_point: Some("vs_main"),
206206
compilation_options: Default::default(),
207207
buffers: &[],
208208
},
209209
fragment: Some(wgpu::FragmentState {
210210
module: &shader,
211-
entry_point: "fs_main",
211+
entry_point: Some("fs_main"),
212212
compilation_options: Default::default(),
213213
targets: &[Some(wgpu::ColorTargetState {
214214
format: config.view_formats[0],

examples/src/conservative_raster/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ impl crate::framework::Example for Example {
9696
layout: Some(&pipeline_layout_empty),
9797
vertex: wgpu::VertexState {
9898
module: &shader_triangle_and_lines,
99-
entry_point: "vs_main",
99+
entry_point: Some("vs_main"),
100100
compilation_options: Default::default(),
101101
buffers: &[],
102102
},
103103
fragment: Some(wgpu::FragmentState {
104104
module: &shader_triangle_and_lines,
105-
entry_point: "fs_main_red",
105+
entry_point: Some("fs_main_red"),
106106
compilation_options: Default::default(),
107107
targets: &[Some(RENDER_TARGET_FORMAT.into())],
108108
}),
@@ -122,13 +122,13 @@ impl crate::framework::Example for Example {
122122
layout: Some(&pipeline_layout_empty),
123123
vertex: wgpu::VertexState {
124124
module: &shader_triangle_and_lines,
125-
entry_point: "vs_main",
125+
entry_point: Some("vs_main"),
126126
compilation_options: Default::default(),
127127
buffers: &[],
128128
},
129129
fragment: Some(wgpu::FragmentState {
130130
module: &shader_triangle_and_lines,
131-
entry_point: "fs_main_blue",
131+
entry_point: Some("fs_main_blue"),
132132
compilation_options: Default::default(),
133133
targets: &[Some(RENDER_TARGET_FORMAT.into())],
134134
}),
@@ -149,13 +149,13 @@ impl crate::framework::Example for Example {
149149
layout: Some(&pipeline_layout_empty),
150150
vertex: wgpu::VertexState {
151151
module: &shader_triangle_and_lines,
152-
entry_point: "vs_main",
152+
entry_point: Some("vs_main"),
153153
compilation_options: Default::default(),
154154
buffers: &[],
155155
},
156156
fragment: Some(wgpu::FragmentState {
157157
module: &shader_triangle_and_lines,
158-
entry_point: "fs_main_white",
158+
entry_point: Some("fs_main_white"),
159159
compilation_options: Default::default(),
160160
targets: &[Some(config.view_formats[0].into())],
161161
}),
@@ -213,13 +213,13 @@ impl crate::framework::Example for Example {
213213
layout: Some(&pipeline_layout),
214214
vertex: wgpu::VertexState {
215215
module: &shader,
216-
entry_point: "vs_main",
216+
entry_point: Some("vs_main"),
217217
compilation_options: Default::default(),
218218
buffers: &[],
219219
},
220220
fragment: Some(wgpu::FragmentState {
221221
module: &shader,
222-
entry_point: "fs_main",
222+
entry_point: Some("fs_main"),
223223
compilation_options: Default::default(),
224224
targets: &[Some(config.view_formats[0].into())],
225225
}),

examples/src/cube/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,13 @@ impl crate::framework::Example for Example {
243243
layout: Some(&pipeline_layout),
244244
vertex: wgpu::VertexState {
245245
module: &shader,
246-
entry_point: "vs_main",
246+
entry_point: Some("vs_main"),
247247
compilation_options: Default::default(),
248248
buffers: &vertex_buffers,
249249
},
250250
fragment: Some(wgpu::FragmentState {
251251
module: &shader,
252-
entry_point: "fs_main",
252+
entry_point: Some("fs_main"),
253253
compilation_options: Default::default(),
254254
targets: &[Some(config.view_formats[0].into())],
255255
}),
@@ -272,13 +272,13 @@ impl crate::framework::Example for Example {
272272
layout: Some(&pipeline_layout),
273273
vertex: wgpu::VertexState {
274274
module: &shader,
275-
entry_point: "vs_main",
275+
entry_point: Some("vs_main"),
276276
compilation_options: Default::default(),
277277
buffers: &vertex_buffers,
278278
},
279279
fragment: Some(wgpu::FragmentState {
280280
module: &shader,
281-
entry_point: "fs_wire",
281+
entry_point: Some("fs_wire"),
282282
compilation_options: Default::default(),
283283
targets: &[Some(wgpu::ColorTargetState {
284284
format: config.view_formats[0],

examples/src/hello_compute/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ async fn execute_gpu_inner(
109109
label: None,
110110
layout: None,
111111
module: &cs_module,
112-
entry_point: "main",
112+
entry_point: Some("main"),
113113
compilation_options: Default::default(),
114114
cache: None,
115115
});

examples/src/hello_synchronization/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ async fn execute(
103103
label: None,
104104
layout: Some(&pipeline_layout),
105105
module: &shaders_module,
106-
entry_point: "patient_main",
106+
entry_point: Some("patient_main"),
107107
compilation_options: Default::default(),
108108
cache: None,
109109
});
110110
let hasty_pipeline = device.create_compute_pipeline(&wgpu::ComputePipelineDescriptor {
111111
label: None,
112112
layout: Some(&pipeline_layout),
113113
module: &shaders_module,
114-
entry_point: "hasty_main",
114+
entry_point: Some("hasty_main"),
115115
compilation_options: Default::default(),
116116
cache: None,
117117
});

examples/src/hello_triangle/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ async fn run(event_loop: EventLoop<()>, window: Window) {
5959
layout: Some(&pipeline_layout),
6060
vertex: wgpu::VertexState {
6161
module: &shader,
62-
entry_point: "vs_main",
62+
entry_point: Some("vs_main"),
6363
buffers: &[],
6464
compilation_options: Default::default(),
6565
},
6666
fragment: Some(wgpu::FragmentState {
6767
module: &shader,
68-
entry_point: "fs_main",
68+
entry_point: Some("fs_main"),
6969
compilation_options: Default::default(),
7070
targets: &[Some(swapchain_format.into())],
7171
}),

examples/src/hello_workgroups/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ async fn run() {
110110
label: None,
111111
layout: Some(&pipeline_layout),
112112
module: &shader,
113-
entry_point: "main",
113+
entry_point: Some("main"),
114114
compilation_options: Default::default(),
115115
cache: None,
116116
});

0 commit comments

Comments
 (0)