GPUOpen-LibrariesAndSDKs / RenderPipelineShaders

Render Pipeline Shaders SDK
MIT License
312 stars 24 forks source link

Fix Builder test update info #31

Open Mcgode opened 1 year ago

Mcgode commented 1 year ago

In test_builder, we use the following structure to pass graph info:

struct PrivateUpdateInfo
{
    uint32_t width;
    uint32_t height;
    RpsBool  bUseOffscreenRT;
    RpsBool  bUseMSAA;
};

However we were using rpsTypeInfoInitFromType(void*) to pass param type information to the graph. This resulted in the graph param size being set to 8 bytes (the size of a pointer on an x64 machine), while the actual data in 16 bytes long. This meant that the struct data was only partially copied, and that the values of booleans fetched in the builder callback were undefined.

This PR fixes the issue by passing the correct type in the param information field.

FlorianHerickAMD commented 1 year ago

Thank you for reporting this. We will address this either as part of a small maintenance update or the next version.