|
|
|
@ -24,7 +24,7 @@ impl DebugPass {
|
|
|
|
|
target_info: ViewportInfo,
|
|
|
|
|
) -> Self {
|
|
|
|
|
// TODO hook into ShaderStore system
|
|
|
|
|
let shader = device.create_shader_module(&wgpu::include_wgsl!("debug_shader.wgsl"));
|
|
|
|
|
let shader = device.create_shader_module(wgpu::include_wgsl!("debug_shader.wgsl"));
|
|
|
|
|
|
|
|
|
|
let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
|
|
|
|
|
label: Some("DebugPass Pipeline Layout"),
|
|
|
|
@ -43,11 +43,11 @@ impl DebugPass {
|
|
|
|
|
fragment: Some(wgpu::FragmentState {
|
|
|
|
|
module: &shader,
|
|
|
|
|
entry_point: "fs_main",
|
|
|
|
|
targets: &[wgpu::ColorTargetState {
|
|
|
|
|
targets: &[Some(wgpu::ColorTargetState {
|
|
|
|
|
format: target_info.output_format,
|
|
|
|
|
blend: Some(wgpu::BlendState::REPLACE),
|
|
|
|
|
write_mask: wgpu::ColorWrites::ALL,
|
|
|
|
|
}],
|
|
|
|
|
})],
|
|
|
|
|
}),
|
|
|
|
|
primitive: wgpu::PrimitiveState {
|
|
|
|
|
topology: wgpu::PrimitiveTopology::LineList,
|
|
|
|
@ -130,7 +130,7 @@ impl RenderPass for DebugPass {
|
|
|
|
|
self.device
|
|
|
|
|
.create_render_bundle_encoder(&wgpu::RenderBundleEncoderDescriptor {
|
|
|
|
|
label: Some("DebugPass Render Bundle"),
|
|
|
|
|
color_formats: &[self.target_info.output_format],
|
|
|
|
|
color_formats: &[Some(self.target_info.output_format)],
|
|
|
|
|
depth_stencil: Some(wgpu::RenderBundleDepthStencil {
|
|
|
|
|
format: self.target_info.depth_format,
|
|
|
|
|
depth_read_only: false, // TODO optimize?
|
|
|
|
|