Setting QT_QPA_PLATFORM with putenv from a local variable
causes the environment to later still refer to it when it's out of scope.
Use setenv instead, as it copies the values provided.
When mutable descriptor sets are used, Fossizlie needs the
VkMutableDescriptorSetCreateInfoEXT. However, instead of taking it raw
like some other inputs, it uses a simplified version that is just a list
of lists. If we give it full structs, Fossilize will crash. In order to
do this, we need a couple special cases.
* Set sType for query-return structures.
* Ignore pass boundaries to not mix queries inside and outside of renderpass
boundaries.
* Wait for idle before fetching KHR results (don't think it should be necessary
with VK_QUERY_RESULT_WAIT_BIT but validation expects it).
* This was variably sized so in practice we didn't use it, but the spec still
requires us to respect the max sizes that could be used for the upper bound
and this lead to the wrong texture being sampled on NV.
* Previously when replaying we'd always use our d3dcompiler_47.dll that we ship,
but during capture we would always prioritise re-using an existing d3dcompiler
that the process already had.
* Since it should be safe to have multiple (differently named) d3dcompiler's in
the same process and we want to avoid using an old out of date d3dcompiler if
possible, we prioritise loading a new d3dcompiler_47.dll over re-using an
existing in-process d3dcompiler_43.dll
* MS has deleted vbscript because breaking things is fun, so we use jscript
instead to do the weird replace of '#' so that numbers read from the registry
can be compared to numbers
* On a new enough dxc we can pass a flag to tell it to ignore dxil.dll
* This allows the tests to run on the test machine with an old windows SDK
(where the demos project copies the dxcompiler.dll + dxil.dll from) but still
pull in a new dxcompiler.dll without having it break on an old dxil.dll
* This would happen if a #line referenced the file it was already in - we would
only start outputting lines starting from the first one. Normally in this case
there's a #line before any text, but that's not guaranteed.
* This allows us to better return a valid mapped resource for an address even in
the case of overlaps/aliasing which might otherwise 'hide' a larger buffer.