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

DX12 backend no longer works after #5956 #6162

Closed
xiaopengli89 opened this issue Aug 26, 2024 · 11 comments · Fixed by #6173
Closed

DX12 backend no longer works after #5956 #6162

xiaopengli89 opened this issue Aug 26, 2024 · 11 comments · Fixed by #6173

Comments

@xiaopengli89
Copy link
Contributor

Description
DX12 backend no longer works after #5956

Extra materials
img_v3_02e4_81d7d4ed-580e-4c46-b5f5-f40baafd21ag

@MarijnS95
Copy link
Contributor

MarijnS95 commented Aug 26, 2024

Works fine here:

image

(Except that the water looks like a glitch when simulating waves at 16ms/frame while running 240Hz)

[2024-08-26T18:53:03Z INFO  wgpu_examples::framework] Initializing wgpu...
[2024-08-26T18:53:03Z INFO  wgpu_core::instance] Adapter AdapterInfo { name: "Intel(R) Graphics XXXX", vendor: 32902, device: 22176, device_type: DiscreteGpu, driver: "XXX", driver_info: "", backend: Dx12 }
[2024-08-26T18:53:03Z INFO  wgpu_examples::framework] Using Intel(R) Graphics XXXX (Dx12)
[2024-08-26T18:53:03Z WARN  wgpu_core::instance] Missing downlevel flags: DownlevelFlags(VERTEX_AND_INSTANCE_INDEX_RESPECTS_RESPECTIVE_FIRST_VALUE_IN_INDIRECT_DRAW)
    The underlying API or device in use does not support enough features to be a fully compliant implementation of WebGPU. A subset of the features can still be used. If you are running this program on native and not in a browser and wish to limit the features you use to the supported subset, call Adapter::downlevel_properties or Device::downlevel_properties to get a listing of the features the current platform supports.
[2024-08-26T18:53:03Z WARN  wgpu_core::instance] DownlevelCapabilities {
        flags: DownlevelFlags(
            COMPUTE_SHADERS | FRAGMENT_WRITABLE_STORAGE | INDIRECT_EXECUTION | BASE_VERTEX | READ_ONLY_DEPTH_STENCIL | NON_POWER_OF_TWO_MIPMAPPED_TEXTURES | CUBE_ARRAY_TEXTURES | COMPARISON_SAMPLERS | INDEPENDENT_BLEND | VERTEX_STORAGE | ANISOTROPIC_FILTERING | FRAGMENT_STORAGE | MULTISAMPLED_SHADING | DEPTH_TEXTURE_AND_BUFFER_COPIES | WEBGPU_TEXTURE_FORMAT_SUPPORT | BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED | UNRESTRICTED_INDEX_BUFFER | FULL_DRAW_INDEX_UINT32 | DEPTH_BIAS_CLAMP | VIEW_FORMATS | UNRESTRICTED_EXTERNAL_TEXTURE_COPIES | SURFACE_VIEW_FORMATS | NONBLOCKING_QUERY_RESOLVE,
        ),
        limits: DownlevelLimits,
        shader_model: Sm5,
    }
[2024-08-26T18:53:03Z INFO  wgpu_examples::framework] Entering event loop...
[2024-08-26T18:53:03Z INFO  wgpu_examples::framework] Surface resume PhysicalSize { width: 800, height: 600 }
[2024-08-26T18:53:03Z INFO  wgpu_examples::framework] Surface resize PhysicalSize { width: 3824, height: 984 }
[2024-08-26T18:53:03Z INFO  wgpu_examples::framework] Surface resize PhysicalSize { width: 800, height: 600 }
[2024-08-26T18:53:03Z INFO  wgpu_examples::framework] Surface resize PhysicalSize { width: 800, height: 600 }
[2024-08-26T18:53:04Z INFO  wgpu_examples::framework] Frame time 3.51ms (284.9 FPS)
[2024-08-26T18:53:05Z INFO  wgpu_examples::framework] Frame time 2.52ms (397.3 FPS)
[2024-08-26T18:53:06Z INFO  wgpu_examples::framework] Frame time 3.43ms (291.9 FPS)
[2024-08-26T18:53:07Z INFO  wgpu_examples::framework] Frame time 2.08ms (480.0 FPS)

@MarijnS95
Copy link
Contributor

MarijnS95 commented Aug 26, 2024

Note that there were a lot of unclean broken hacks introduced by #3668 for Intel Iris: I may have removed some.

EDIT: Just in case I forced suballocation_supported: false on my machine to take the fallback committed texture/buffer path, and everything still works fine :)

@Vecvec
Copy link
Contributor

Vecvec commented Aug 26, 2024

Works on my desktop (though for some reason capped to 240 while my display is 120fps)
image

[2024-08-26T19:24:48Z INFO  wgpu_examples::framework] Initializing wgpu...
[2024-08-26T19:24:48Z INFO  wgpu_core::instance] Adapter AdapterInfo { name: "NVIDIA GeForce RTX 3050", vendor: 4318, device: 9479, device_type: DiscreteGpu, driver: "31.0.15.5132", driver_info: "", backend: Dx12 }
[2024-08-26T19:24:48Z INFO  wgpu_core::instance] Adapter AdapterInfo { name: "Intel(R) UHD Graphics 770", vendor: 32902, device: 18048, device_type: IntegratedGpu, driver: "31.0.101.4577", driver_info: "", backend: Dx12 }
[2024-08-26T19:24:48Z INFO  wgpu_examples::framework] Using Intel(R) UHD Graphics 770 (Dx12)
[2024-08-26T19:24:48Z WARN  wgpu_core::instance] Missing downlevel flags: DownlevelFlags(VERTEX_AND_INSTANCE_INDEX_RESPECTS_RESPECTIVE_FIRST_VALUE_IN_INDIRECT_DRAW)
    The underlying API or device in use does not support enough features to be a fully compliant implementation of WebGPU. A subset of the features can still be used. If you are running this program on native and not in a browser and wish to limit the features you use to the supported subset, call Adapter::downlevel_properties or Device::downlevel_properties to get a listing of the features the current platform supports.
[2024-08-26T19:24:48Z WARN  wgpu_core::instance] DownlevelCapabilities {
        flags: DownlevelFlags(
            COMPUTE_SHADERS | FRAGMENT_WRITABLE_STORAGE | INDIRECT_EXECUTION | BASE_VERTEX | READ_ONLY_DEPTH_STENCIL | NON_POWER_OF_TWO_MIPMAPPED_TEXTURES | CUBE_ARRAY_TEXTURES | COMPARISON_SAMPLERS | INDEPENDENT_BLEND | VERTEX_STORAGE | ANISOTROPIC_FILTERING 
| FRAGMENT_STORAGE | MULTISAMPLED_SHADING | DEPTH_TEXTURE_AND_BUFFER_COPIES | WEBGPU_TEXTURE_FORMAT_SUPPORT | BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED | UNRESTRICTED_INDEX_BUFFER | FULL_DRAW_INDEX_UINT32 | DEPTH_BIAS_CLAMP | VIEW_FORMATS | UNRESTRICTED_EXTERNAL_TEXTURE_COPIES | SURFACE_VIEW_FORMATS | NONBLOCKING_QUERY_RESOLVE,
        ),
        limits: DownlevelLimits,
        shader_model: Sm5,
    }
[2024-08-26T19:24:48Z INFO  wgpu_examples::framework] Entering event loop...
[2024-08-26T19:24:48Z INFO  wgpu_examples::framework] Surface resume PhysicalSize { width: 800, height: 600 }
[2024-08-26T19:24:48Z INFO  wgpu_examples::framework] Surface resize PhysicalSize { width: 1424, height: 714 }
[2024-08-26T19:24:48Z INFO  wgpu_examples::framework] Surface resize PhysicalSize { width: 800, height: 600 }
[2024-08-26T19:24:48Z INFO  wgpu_examples::framework] Surface resize PhysicalSize { width: 800, height: 600 }
[2024-08-26T19:24:49Z INFO  wgpu_examples::framework] Frame time 6.38ms (156.8 FPS)

but not my laptop ( and still frame capped at 2x fps)
image

[2024-08-26T19:29:53Z INFO  wgpu_examples::framework] Initializing wgpu...
[2024-08-26T19:29:53Z INFO  wgpu_core::instance] Adapter AdapterInfo { name: "Intel(R) UHD Graphics", vendor: 32902, device: 39745, device_type: IntegratedGpu, driver: "27.20.100.9664", driver_info: "", backend: Dx12 }
[2024-08-26T19:29:53Z INFO  wgpu_examples::framework] Using Intel(R) UHD Graphics (Dx12)
[2024-08-26T19:29:53Z WARN  wgpu_core::instance] Missing downlevel flags: DownlevelFlags(VERTEX_AND_INSTANCE_INDEX_RESPECTS_RESPECTIVE_FIRST_VALUE_IN_INDIRECT_DRAW)
    The underlying API or device in use does not support enough features to be a fully compliant implementation of WebGPU. A subset of the features can still be used. If you are running this program on native and not in a browser and wish to limit the features you use to the supported subset, call Adapter::downlevel_properties or Device::downlevel_properties to get a listing of the features the current platform supports.
[2024-08-26T19:29:53Z WARN  wgpu_core::instance] DownlevelCapabilities {
        flags: DownlevelFlags(
            COMPUTE_SHADERS | FRAGMENT_WRITABLE_STORAGE | INDIRECT_EXECUTION | BASE_VERTEX | READ_ONLY_DEPTH_STENCIL | NON_POWER_OF_TWO_MIPMAPPED_TEXTURES | CUBE_ARRAY_TEXTURES | COMPARISON_SAMPLERS | INDEPENDENT_BLEND | VERTEX_STORAGE | ANISOTROPIC_FILTERING
| FRAGMENT_STORAGE | MULTISAMPLED_SHADING | DEPTH_TEXTURE_AND_BUFFER_COPIES | WEBGPU_TEXTURE_FORMAT_SUPPORT | BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED | UNRESTRICTED_INDEX_BUFFER | FULL_DRAW_INDEX_UINT32 | DEPTH_BIAS_CLAMP | VIEW_FORMATS | UNRESTRICTED_EXTERNAL_TEXTURE_COPIES | SURFACE_VIEW_FORMATS | NONBLOCKING_QUERY_RESOLVE,
        ),
        limits: DownlevelLimits,
        shader_model: Sm5,
    }
[2024-08-26T19:29:54Z INFO  wgpu_examples::framework] Entering event loop...
[2024-08-26T19:29:54Z INFO  wgpu_examples::framework] Surface resume PhysicalSize { width: 800, height: 600 }
[2024-08-26T19:29:54Z INFO  wgpu_examples::framework] Surface resize PhysicalSize { width: 1424, height: 714 }
[2024-08-26T19:29:54Z INFO  wgpu_examples::framework] Surface resize PhysicalSize { width: 800, height: 600 }
[2024-08-26T19:29:54Z INFO  wgpu_examples::framework] Surface resize PhysicalSize { width: 800, height: 600 }
[2024-08-26T19:29:55Z INFO  wgpu_examples::framework] Frame time 19.61ms (51.0 FPS)
[2024-08-26T19:29:56Z INFO  wgpu_examples::framework] Frame time 8.35ms (119.8 FPS)

@xiaopengli89
Copy link
Contributor Author

@MarijnS95 It works fine with driver 31.0.101.2128, but not with driver 27.x.x.x.

@Vecvec
Copy link
Contributor

Vecvec commented Aug 27, 2024

that sound right, my laptop is in 27.x.x.x with my desktop in 31.0.101.4577

@MarijnS95
Copy link
Contributor

Can any of you test out https://github.com/MarijnS95/wgpu/compare/semantic-change on a laptop with Intel 27.x.x.x?

@MarijnS95
Copy link
Contributor

Sorry I've force-pushed a few times, please make sure you are on 759f82b.

@Vecvec
Copy link
Contributor

Vecvec commented Aug 27, 2024

It works for me, both water and shadow - which were the ones that I previously tested - work (but there are two unused import warnings)

@MarijnS95
Copy link
Contributor

@Vecvec so that means this fixes the issue? Can you also test #6173, which contains mostly the same change except for ClearDepthStencilView() which requires an upstream binding fix.

@xiaopengli89
Copy link
Contributor Author

@MarijnS95 759f82b works fine for me, but not #6173

@MarijnS95
Copy link
Contributor

@xiaopengli89 thanks for confirming, so I'll have to push the ClearDepthStencilView() workaround (or pass a full rect) until the API fix from microsoft/win32metadata#1971 lands in a subsequent breaking windows-rs release.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants