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

WARP: Uniform Values Arriving As Zero #2296

Closed
metasophiea opened this issue Dec 16, 2021 · 4 comments
Closed

WARP: Uniform Values Arriving As Zero #2296

metasophiea opened this issue Dec 16, 2021 · 4 comments
Labels
api: dx12 Issues with DX12 or DXGI external: driver-bug A driver is causing the bug, though we may still want to work around it

Comments

@metasophiea
Copy link

Within a vertex shader, uniform values are arriving as zero, despite being set with other values. This leads to all calculations which rely on these values being incorrect (leading to blank screens when those resulting values are INF)
Such behaviour is not seen on MacOS, nor seen by PIX. RenderDoc notices the incorrect values, but stepping though the vertex shader code produces the 'correct' values.

Here you can find a trace of this incorrect behaviour
trace.zip

Windows 10: 21H2
wgpu: 0.11.1

@kvark
Copy link
Member

kvark commented Dec 17, 2021

Please post the output of wgpu-info.
So far I tested on Linux/Intel XE (TGL GT2) and Windows/Intel Iris 550, and nothing weird is there, it's rendering just fine.

@kvark kvark added the external: driver-bug A driver is causing the bug, though we may still want to work around it label Dec 17, 2021
@metasophiea
Copy link
Author

metasophiea commented Dec 18, 2021

Adapter 0:
        Backend:   Dx12
        Name:      "Microsoft Basic Render Driver"
        VendorID:  5140
        DeviceID:  140
        Type:      Cpu
        Compliant: true
        Features:
                DEPTH_CLIP_CONTROL:                                             true
                TEXTURE_COMPRESSION_BC:                                         true
                INDIRECT_FIRST_INSTANCE:                                        true
                TIMESTAMP_QUERY:                                                true
                PIPELINE_STATISTICS_QUERY:                                      false
                MAPPABLE_PRIMARY_BUFFERS:                                       true
                TEXTURE_BINDING_ARRAY:                                          false
                BUFFER_BINDING_ARRAY:                                           false
                STORAGE_RESOURCE_BINDING_ARRAY:                                 false
                SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING:  false
                UNIFORM_BUFFER_AND_STORAGE_TEXTURE_ARRAY_NON_UNIFORM_INDEXING:  false
                PARTIALLY_BOUND_BINDING_ARRAY:                                  false
                UNSIZED_BINDING_ARRAY:                                          false
                MULTI_DRAW_INDIRECT:                                            true
                MULTI_DRAW_INDIRECT_COUNT:                                      true
                PUSH_CONSTANTS:                                                 false
                ADDRESS_MODE_CLAMP_TO_BORDER:                                   true
                POLYGON_MODE_LINE:                                              true
                POLYGON_MODE_POINT:                                             true
                TEXTURE_COMPRESSION_ETC2:                                       false
                TEXTURE_COMPRESSION_ASTC_LDR:                                   false
                TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES:                       true
                SHADER_FLOAT64:                                                 false
                VERTEX_ATTRIBUTE_64BIT:                                         false
                CONSERVATIVE_RASTERIZATION:                                     true
                VERTEX_WRITABLE_STORAGE:                                        true
                CLEAR_COMMANDS:                                                 true
                SPIRV_SHADER_PASSTHROUGH:                                       false
                SHADER_PRIMITIVE_INDEX:                                         false
                MULTIVIEW:                                                      false
                TEXTURE_FORMAT_16BIT_NORM:                                      true
        Limits:
                Max Texture Dimension 1d:                        16384
                Max Texture Dimension 2d:                        16384
                Max Texture Dimension 3d:                        2048
                Max Texture Array Layers:                        2048
                Max Bind Groups:                                 8
                Max Dynamic Uniform Buffers Per Pipeline Layout: 8
                Max Dynamic Storage Buffers Per Pipeline Layout: 4
                Max Sampled Textures Per Shader Stage:           1048576
                Max Samplers Per Shader Stage:                   2048
                Max Storage Buffers Per Shader Stage:            8
                Max Storage Textures Per Shader Stage:           8
                Max Uniform Buffers Per Shader Stage:            1048576
                Max Uniform Buffer Binding Size:                 65536
                Max Storage Buffer Binding Size:                 4294967295
                Max Vertex Buffers:                              16
                Max Vertex Attributes:                           32
                Max Vertex Buffer Array Stride:                  2048
                Max Push Constant Size:                          0
                Min Uniform Buffer Offset Alignment:             256
                Min Storage Buffer Offset Alignment:             4
                Max Inter-Stage Shader Component:                60
                Max Compute Workgroup Storage Size:              16352
                Max Compute Invocations Per Workgroup:           768
                Max Compute Workgroup Size X:                    1024
                Max Compute Workgroup Size Y:                    1024
                Max Compute Workgroup Size Z:                    64
                Max Compute Workgroups Per Dimension:            65535
        Downlevel Properties:
                Shader Model:                        Sm5
                COMPUTE_SHADERS:                     true
                FRAGMENT_WRITABLE_STORAGE:           true
                INDIRECT_EXECUTION:                  true
                BASE_VERTEX:                         true
                READ_ONLY_DEPTH_STENCIL:             true
                DEVICE_LOCAL_IMAGE_COPIES:           true
                NON_POWER_OF_TWO_MIPMAPPED_TEXTURES: true
                CUBE_ARRAY_TEXTURES:                 true
                COMPARISON_SAMPLERS:                 true
                INDEPENDENT_BLENDING:                true
                VERTEX_STORAGE:                      true
                ANISOTROPIC_FILTERING:               false
                FRAGMENT_STORAGE:                    true
Adapter 1:
        Backend:   Dx12
        Name:      "Microsoft Basic Render Driver"
        VendorID:  5140
        DeviceID:  140
        Type:      IntegratedGpu
        Compliant: true
        Features:
                DEPTH_CLIP_CONTROL:                                             true
                TEXTURE_COMPRESSION_BC:                                         true
                INDIRECT_FIRST_INSTANCE:                                        true
                TIMESTAMP_QUERY:                                                true
                PIPELINE_STATISTICS_QUERY:                                      false
                MAPPABLE_PRIMARY_BUFFERS:                                       true
                TEXTURE_BINDING_ARRAY:                                          false
                BUFFER_BINDING_ARRAY:                                           false
                STORAGE_RESOURCE_BINDING_ARRAY:                                 false
                SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING:  false
                UNIFORM_BUFFER_AND_STORAGE_TEXTURE_ARRAY_NON_UNIFORM_INDEXING:  false
                PARTIALLY_BOUND_BINDING_ARRAY:                                  false
                UNSIZED_BINDING_ARRAY:                                          false
                MULTI_DRAW_INDIRECT:                                            true
                MULTI_DRAW_INDIRECT_COUNT:                                      true
                PUSH_CONSTANTS:                                                 false
                ADDRESS_MODE_CLAMP_TO_BORDER:                                   true
                POLYGON_MODE_LINE:                                              true
                POLYGON_MODE_POINT:                                             true
                TEXTURE_COMPRESSION_ETC2:                                       false
                TEXTURE_COMPRESSION_ASTC_LDR:                                   false
                TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES:                       true
                SHADER_FLOAT64:                                                 false
                VERTEX_ATTRIBUTE_64BIT:                                         false
                CONSERVATIVE_RASTERIZATION:                                     true
                VERTEX_WRITABLE_STORAGE:                                        true
                CLEAR_COMMANDS:                                                 true
                SPIRV_SHADER_PASSTHROUGH:                                       false
                SHADER_PRIMITIVE_INDEX:                                         false
                MULTIVIEW:                                                      false
                TEXTURE_FORMAT_16BIT_NORM:                                      true
        Limits:
                Max Texture Dimension 1d:                        16384
                Max Texture Dimension 2d:                        16384
                Max Texture Dimension 3d:                        2048
                Max Texture Array Layers:                        2048
                Max Bind Groups:                                 8
                Max Dynamic Uniform Buffers Per Pipeline Layout: 8
                Max Dynamic Storage Buffers Per Pipeline Layout: 4
                Max Sampled Textures Per Shader Stage:           1048576
                Max Samplers Per Shader Stage:                   2048
                Max Storage Buffers Per Shader Stage:            8
                Max Storage Textures Per Shader Stage:           8
                Max Uniform Buffers Per Shader Stage:            1048576
                Max Uniform Buffer Binding Size:                 65536
                Max Storage Buffer Binding Size:                 4294967295
                Max Vertex Buffers:                              16
                Max Vertex Attributes:                           32
                Max Vertex Buffer Array Stride:                  2048
                Max Push Constant Size:                          0
                Min Uniform Buffer Offset Alignment:             256
                Min Storage Buffer Offset Alignment:             4
                Max Inter-Stage Shader Component:                60
                Max Compute Workgroup Storage Size:              16352
                Max Compute Invocations Per Workgroup:           768
                Max Compute Workgroup Size X:                    1024
                Max Compute Workgroup Size Y:                    1024
                Max Compute Workgroup Size Z:                    64
                Max Compute Workgroups Per Dimension:            65535
        Downlevel Properties:
                Shader Model:                        Sm5
                COMPUTE_SHADERS:                     true
                FRAGMENT_WRITABLE_STORAGE:           true
                INDIRECT_EXECUTION:                  true
                BASE_VERTEX:                         true
                READ_ONLY_DEPTH_STENCIL:             true
                DEVICE_LOCAL_IMAGE_COPIES:           true
                NON_POWER_OF_TWO_MIPMAPPED_TEXTURES: true
                CUBE_ARRAY_TEXTURES:                 true
                COMPARISON_SAMPLERS:                 true
                INDEPENDENT_BLENDING:                true
                VERTEX_STORAGE:                      true
                ANISOTROPIC_FILTERING:               false
                FRAGMENT_STORAGE:                    true

@kvark
Copy link
Member

kvark commented Dec 18, 2021

Oh fun, so this is the WARP driver. We've seen issues with it in the past (unfortunately!), and it sounds like one more.
If you can reduce the case to the minimum, I'll be happy to help submitting this bug upstream.

@cwfitzgerald cwfitzgerald changed the title Uniform Values Arriving As Zero WARP: Uniform Values Arriving As Zero Jun 2, 2022
@cwfitzgerald cwfitzgerald added the api: dx12 Issues with DX12 or DXGI label Jun 4, 2022
@cwfitzgerald
Copy link
Member

This has been fixed in WARP itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: dx12 Issues with DX12 or DXGI external: driver-bug A driver is causing the bug, though we may still want to work around it
Projects
None yet
Development

No branches or pull requests

3 participants