Direct X12 error? #11771
Labels
C-Bug
An unexpected or incorrect behavior
S-Needs-Investigation
This issue requires detective work to figure out what's going wrong
Bevy version
0.12.1
The release number or commit hash of the version you're using.
[Optional] Relevant system information
I5-9400f
32gb DDR4 2444MHZ
RX 6650 XT
If you cannot get Bevy to build or run on your machine, please include:
I can: version 1.75.0
on windows 11
cargo --version
)If your bug is rendering-related, copy the adapter info that appears when you run Bevy.
AdapterInfo { name: "AMD Radeon RX 6650 XT", vendor: 4098, device: 29679, device_type: DiscreteGpu, driver: "AMD proprietary driver", driver_info: "23.12.1 (AMD proprietary shader compiler)", backend: Vulkan }
You should also consider testing the examples of our upstream dependencies to help isolate any setup-specific issue:
wgpu
for rendering problemswinit
for input and window managementgilrs
for gamepad inputsWhat you did
the issue is very on/off, it doesn't seem to matter what I do it has about a 50/50 chance of showing up even if im just rebuilding without any errors, i dont know whats causing it.
What went wrong
Its printing
ID3D12CommandQueue::ExecuteCommandLists: Using IDXGISwapChain::Present on Command List (0x000001614C543E50:'Internal DXGI CommandList'): Resource state (0x1C0FE940: D3D12_RESOURCE_STATE_RENDER_TARGET) of resource (0x000001614C5BC6C0:'Unnamed ID3D12Resource Object') (subresource: 0) is invalid for use as a PRESENT_SOURCE. Expected State Bits (all): 0x1C0FE920: D3D12_RESOURCE_STATE_[COMMON|PRESENT], Actual State: 0x1C0FE900: D3D12_RESOURCE_STATE_RENDER_TARGET, Missing State: 0x0: D3D12_RESOURCE_STATE_[COMMON|PRESENT]. [ EXECUTION ERROR #538:
INVALID_SUBRESOURCE_STATE]``every single frame
Additional information
im following: https://www.youtube.com/watch?v=pZRzZiJjJ1I
if it helps
my code is:
`use bevy::prelude::*;
fn main(){
App::new().add_plugins(DefaultPlugins).add_systems(Startup, (spawn_floor, spawn_camera, spawn_light, spawn_player)).run();
}
fn spawn_player(mut commands: Commands, mut meshes: ResMut<Assets>, mut materials: ResMut<Assets>){
let player = PbrBundle{
mesh: meshes.add(Mesh::from(shape::Cube::new(1.0))),
material: materials.add(Color::BLUE.into()),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..default()
};
}
fn spawn_light(mut commands: Commands){
let light = PointLightBundle{
point_light: PointLight{
intensity: 2000.0,
..default()
},
transform: Transform::from_xyz(0., 5., 0.),
..default()
};
}
fn spawn_camera(mut commands: Commands) {
let camera = Camera3dBundle{
transform: Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
..Default::default()
};
}
fn spawn_floor(mut commands: Commands, mut meshes: ResMut<Assets>, mut materials: ResMut<Assets>){
let floor = PbrBundle{
mesh: meshes.add(Mesh::from(shape::Plane::from_size(15.0))),
material: materials.add(Color::DARK_GREEN.into()),
..default()
};
}
The text was updated successfully, but these errors were encountered: