Closed Gordon-F closed 3 years ago
Thank you for filing!
What's the use case that hits this assertion?
The color_index
is assigned by the following code:
for info in attachment_infos {
let view = info.image_view.clone();
let aspects = view.aspects();
let color_index = if aspects.contains(Aspects::COLOR) {
colors.push(view);
Some(colors.len() as u8 - 1)
} else {
depth_stencil = Some(view);
None
};
attachments.push(AttachmentInfo {
color_index,
clear_value: info.clear_value,
})
}
So for each attachment that has a color, color_index
should be Some
, and in the affected loop we are iterating through color_attachments
. So something seems off. Please provide more info about this test case.
@kvark I tested this case with wgpu hello-triangle with wgpu from this branch.
But now i tested gfx-rs quad example and got same error:
EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
AdapterInfo { name: "Mali-T830", vendor: 5045, device: 0, device_type: IntegratedGpu }
Memory types: [MemoryType { properties: CPU_VISIBLE | CPU_CACHED, heap_index: 1 }, MemoryType { properties: CPU_VISIBLE, heap_index: 1 }, MemoryType { properties: DEVICE_LOCAL, heap_index: 0 }, MemoryType { properties: DEVICE_LOCAL, heap_index: 0 }]
formats: Some([Rgba8Srgb, Bgra8Srgb])
SwapchainConfig { present_mode: FIFO, composite_alpha_mode: OPAQUE, format: Rgba8Srgb, extent: Extent2D { width: 1024, height: 768 }, image_count: 2, image_layers: 1, image_usage: COLOR_ATTACHMENT }
[src/backend/gl/src/device.rs:869] &subpass = SubpassDesc {
colors: [
(
0,
ColorAttachmentOptimal,
),
],
depth_stencil: None,
inputs: [],
resolves: [],
preserves: [],
}
[src/backend/gl/src/device.rs:875] &color_attachments = [
0,
]
[src/backend/gl/src/device.rs:875] &depth_stencil = None
[src/backend/gl/src/command.rs:522] &state.attachments = [
AttachmentInfo {
color_index: None,
clear_value: ClearValue {
color: [
1061997773,
1061997773,
1065353216,
],
depth_stencil: ClearDepthStencil {
depth: 0.8,
stencil: 1061997773,
},
},
},
]
[src/backend/gl/src/command.rs:523] &subpass.color_attachments = [
0,
]
I/RustStdoutStderr: thread '<unnamed>' panicked at 'Error InvalidFramebufferOperation executing command: Draw { primitive: 4, vertices: 0..6, instances: 0..1 }', src/backend/gl/src/queue.rs:1066:13
I/RustStdoutStderr: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
W/libEGL: EGLNativeWindowType 0x72f97a6010 disconnect failed
I/RustStdoutStderr: DROPPED!
I'm not able to debug at this very moment due to #3588
Could you step into begin_render_pass
to see why color_index
isn't getting set properly?
Because aspects is empty?
[src/backend/gl/src/command.rs:819] &info = RenderAttachmentInfo {
image_view: Renderbuffer {
raw: 1,
aspects: (empty),
},
clear_value: ClearValue {
color: [
1061997773,
1061997773,
1065353216,
],
depth_stencil: ClearDepthStencil {
depth: 0.8,
stencil: 1061997773,
},
},
}
Short info header:
Find some regressions after merged https://github.com/gfx-rs/gfx/pull/3571:
Tested with hello-triangle wgpu example.
Option::unwrap()
on aNone
value', /Users/indish/Dev/RustProjects/gfx/src/backend/gl/src/command.rs:527:64After some hacks works fine:
Full OpenGL ES Trace.
Vulkan works fine.