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

Chapter2: Descriptor index 22 is uninitialized #23

Closed
dorian-apanel-intel opened this issue Mar 10, 2023 · 4 comments
Closed

Chapter2: Descriptor index 22 is uninitialized #23

dorian-apanel-intel opened this issue Mar 10, 2023 · 4 comments

Comments

@dorian-apanel-intel
Copy link
Contributor

dorian-apanel-intel commented Mar 10, 2023

There is and issue with uninitialized descriptor in Chapter 2 code.
It causes page fault on Intel HW, but can be detected on NVidia using latest SDK Validation Layers with "GPU Assisted" preset enabled.

UNASSIGNED-Descriptor uninitialized(ERROR / SPEC): msgNum: -1993010233 - Validation Error: [ UNASSIGNED-Descriptor uninitialized ] Object 0: handle = 0x207718ce700, type = VK_OBJECT_TYPE_QUEUE; | MessageID = 0x893513c7 | Descriptor index 22 is uninitialized. Command buffer (0x20771d65700). Draw Index 0x6. Pipeline (c)(0x207721bd690). Shader Module (main)(0x20771e4cae0). Shader Instruction Index = 317.  Stage = Fragment.  Fragment coord (x,y) = (1278.5, 18.5).  Shader validation error occurred in file temp.shader at line 110.Unable to find suitable #line directive in SPIR-V OpSource.
    Objects: 1
       [0]  0x207718ce700, type: 4, name: NULL
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in RaptorEngine_Chapter2_Debug.exe.

Occurs in seventh draw of third compiled pipeline. (first draw that actually spawn fragments)
Stripping fragment shader to just:

vec4 base_colour = texture(global_textures[nonuniformEXT(textures.x)], vTexcoord0) * base_color_factor;
frag_color = vec4( encode_srgb( material_colour ), base_colour.a );

Also gives the same error.

@dorian-apanel-intel
Copy link
Contributor Author

Issue can be seen using Renderdoc:
image

@dorian-apanel-intel
Copy link
Contributor Author

Descriptor array that is used in global_textures is not updated in first frame at all.
It is updated later, in section // Handle deferred writes to bindless textures.
It has to be initialized with some default textures or not used in such case.

@theWatchmen
Copy link
Collaborator

PR has been merged and ported fix to remaining chapters.

@dorian-apanel-intel
Copy link
Contributor Author

Thanks :)

Partially verified here: #26 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants