Skip to content

Lavapipe causes access violation accessing intersection.world_to_object #6731

@Vecvec

Description

@Vecvec

Description
Since I got lavapipe installed I've been testing it with ray-tracing, and it seems that if a section of the intersection struct is accessed that needs a triangle to be hit (not done within the current examples) lavapipe dereferences a null pointer and crashes. I think this is actually our issue, as we gather these members without caring whether we have hit anything or not (this is technically undefined behavior). I think that the best way to deal with this is to emit a function for it for the three different blocks required. I am happy to do this.

Repro steps
add this line to any of the ray cube examples

color  = vec4f(intersection.world_to_object[0].x)

and run with lavapipe

Expected vs observed behavior
it should give an access violation

Platform
latest trunk wgpu w/ change

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions