Giter Club home page Giter Club logo

Comments (5)

thatcosmonaut avatar thatcosmonaut commented on September 13, 2024 2

I think the issue here is non-intuitive struct padding caused by the change of SDL_bool to a 1-byte type. I'll look into this.

from sdl.

JBetz avatar JBetz commented on September 13, 2024

image

from sdl.

Capati avatar Capati commented on September 13, 2024

I can relate to this issue using Odin Language, in my case the attachmentInfo becames invalid in the SDL side, acctually everything after depthStencilState turn invalid.

Using an AddressSanitizer I got this information:

==13132==ERROR: AddressSanitizer: access-violation on unknown address 0x000000000000 (pc 0x7ffb35e7459d bp 0x0036f86ff020 sp 0x0036f86fede0 T0)
==13132==The signal is caused by a READ memory access.
==13132==Hint: address points to the zero page.
    #0 0x7ffb35e7459c in SDL_CreateGPUGraphicsPipeline_REAL \cpp\SDL\src\gpu\SDL_gpu.c:650
    #1 0x7ffb35e376ae in SDL_CreateGPUGraphicsPipeline \cpp\SDL\src\dynapi\SDL_dynapi_procs.h:135
    #2 0x7ff70260a691 in sdl3.create_gpu_graphics_pipeline \odin\sdl3-odin\sdl3\sdl_gpu.odin:1118:14
    #3 0x7ff70259c6b1 in gpu_basic_triangle.init \basic_triangle.odin:59:22
    #4 0x7ff70259ce69 in gpu_basic_triangle.main \basic_triangle.odin:80:2
    #5 0x7ff7025f3c4e in main \base\runtime\entry_windows.odin:46:4
    #6 0x7ff70265b03b in invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
    #7 0x7ff70265b03b in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
    #8 0x7ffb85ac257c  (C:\Windows\System32\KERNEL32.DLL+0x18001257c)
    #9 0x7ffb8708af27  (C:\Windows\SYSTEM32\ntdll.dll+0x18005af27)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: access-violation \cpp\SDL\src\gpu\SDL_gpu.c:650 in SDL_CreateGPUGraphicsPipeline_REAL
==13132==ABORTING

Line to the breakpoint:

image

After more debugging on my side using raddbg, I see a padding before attachmentInfo, not sure if its a compiler optimization or ui bug:

image

from sdl.

JBetz avatar JBetz commented on September 13, 2024

It works when I specify the bool fields as 1-byte:
image

from sdl.

thatcosmonaut avatar thatcosmonaut commented on September 13, 2024

PR: #10701

from sdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.