Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct X12 error? #11771

Closed
Rain-Gayming opened this issue Feb 7, 2024 · 3 comments
Closed

Direct X12 error? #11771

Rain-Gayming opened this issue Feb 7, 2024 · 3 comments
Labels
C-Bug An unexpected or incorrect behavior S-Needs-Investigation This issue requires detective work to figure out what's going wrong

Comments

@Rain-Gayming
Copy link

Rain-Gayming commented Feb 7, 2024

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

  • the Rust version you're using (you can get this by running cargo --version)
    • Bevy relies on the "latest stable release" of Rust
    • nightly should generally work, but there are sometimes regressions: please let us know!
  • the operating system or browser used, including its version
    • e.g. Windows 10, Ubuntu 18.04, iOS 14

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 problems
  • winit for input and window management
  • gilrs for gamepad inputs

What 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()
};

commands.spawn(player);

}

fn spawn_light(mut commands: Commands){
let light = PointLightBundle{
point_light: PointLight{
intensity: 2000.0,
..default()
},
transform: Transform::from_xyz(0., 5., 0.),
..default()
};

commands.spawn(light);

}

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()
};

commands.spawn(camera);

}

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()
};

commands.spawn(floor);

}

@Rain-Gayming Rain-Gayming added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Feb 7, 2024
@GitGhillie
Copy link
Contributor

Looks like #9975

@Rain-Gayming
Copy link
Author

Thanks :D

@alice-i-cecile alice-i-cecile added S-Needs-Investigation This issue requires detective work to figure out what's going wrong and removed S-Needs-Triage This issue needs to be labelled labels Feb 9, 2024
@alice-i-cecile
Copy link
Member

Closing as duplicate: good issue sleuthing :)

@alice-i-cecile alice-i-cecile closed this as not planned Won't fix, can't repro, duplicate, stale Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

No branches or pull requests

3 participants