mirror of
https://github.com/doukutsu-rs/gfx.git
synced 2026-08-24 13:03:25 -07:00
Line width state is not tied only to line polygon mode and storing it there has correctness implications on Vulkan back-end. This is problematic for gfx-portability when targeting Vulkan back-end, since it can cause correct Vulkan application to trigger validation errors.
113 lines
2.2 KiB
Plaintext
113 lines
2.2 KiB
Plaintext
(
|
|
resources: {
|
|
"image.color": Image(
|
|
kind: D2(1, 1, 1, 1),
|
|
num_levels: 1,
|
|
format: Rgba8Unorm,
|
|
usage: (bits: 0x15), //COLOR_ATTACHMENT | TRANSFER_SRC (for reading) | SAMPLED (temporary for GL)
|
|
),
|
|
"pass": RenderPass(
|
|
attachments: {
|
|
"c": (
|
|
format: Some(Rgba8Unorm),
|
|
samples: 1,
|
|
ops: (load: Clear, store: Store),
|
|
layouts: (start: General, end: General),
|
|
),
|
|
},
|
|
subpasses: {
|
|
"main": (
|
|
colors: [("c", General)],
|
|
depth_stencil: None,
|
|
)
|
|
},
|
|
dependencies: [],
|
|
),
|
|
"image.color.view": ImageView(
|
|
image: "image.color",
|
|
kind: D2,
|
|
format: Rgba8Unorm,
|
|
range: (
|
|
aspects: (bits: 1),
|
|
levels: (start: 0, end: 1),
|
|
layers: (start: 0, end: 1),
|
|
),
|
|
),
|
|
"fbo": Framebuffer(
|
|
pass: "pass",
|
|
views: {
|
|
"c": "image.color.view"
|
|
},
|
|
extent: (
|
|
width: 1,
|
|
height: 1,
|
|
depth: 1,
|
|
),
|
|
),
|
|
"pipe-layout": PipelineLayout(
|
|
set_layouts: [],
|
|
push_constant_ranges: [],
|
|
),
|
|
"shader.passthrough.vs": Shader("passthrough.vert"),
|
|
"shader.passthrough.fs": Shader("passthrough.frag"),
|
|
"pipe.passthrough": GraphicsPipeline(
|
|
shaders: (
|
|
vertex: "shader.passthrough.vs",
|
|
fragment: "shader.passthrough.fs",
|
|
),
|
|
rasterizer: (
|
|
polygon_mode: Fill,
|
|
cull_face: (bits: 0),
|
|
front_face: Clockwise,
|
|
depth_clamping: false,
|
|
depth_bias: None,
|
|
conservative: false,
|
|
line_width: Static(1.0),
|
|
),
|
|
input_assembler: (
|
|
primitive: TriangleList,
|
|
with_adjacency: false,
|
|
restart_index: None,
|
|
),
|
|
blender: (
|
|
alpha_coverage: false,
|
|
logic_op: None,
|
|
targets: [
|
|
(mask: (bits: 15), blend: None),
|
|
],
|
|
),
|
|
layout: "pipe-layout",
|
|
subpass: (
|
|
parent: "pass",
|
|
index: 0,
|
|
),
|
|
),
|
|
},
|
|
jobs: {
|
|
"empty": Graphics(
|
|
framebuffer: "fbo",
|
|
clear_values: [
|
|
Color(Float((0.8, 0.8, 0.8, 1.0))),
|
|
],
|
|
pass: ("pass", {
|
|
"main": (commands: [
|
|
]),
|
|
}),
|
|
),
|
|
"pass-through": Graphics(
|
|
framebuffer: "fbo",
|
|
clear_values: [
|
|
Color(Float((0.8, 0.8, 0.8, 1.0))),
|
|
],
|
|
pass: ("pass", {
|
|
"main": (commands: [
|
|
BindPipeline("pipe.passthrough"),
|
|
Draw(
|
|
vertices: (start: 0, end: 3),
|
|
),
|
|
]),
|
|
}),
|
|
),
|
|
},
|
|
)
|