Module: vkd3d Branch: master Commit: 5c285adc6b677c731b34fe2b74336e40bed40716 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/5c285adc6b677c731b34fe2b74336e...
Author: Francisco Casas fcasas@codeweavers.com Date: Fri Mar 10 22:09:58 2023 -0300
vkd3d-shader/hlsl: Use hlsl_ir_index for array and record access.
From this point on, it is no longer true that only hlsl_ir_loads can return objects, because an object can also come from chain of hlsl_ir_indexes that ends in an hlsl_ir_load.
The lower_index_loads pass takes care of lowering all hlsl_ir_indexes into hlsl_ir_loads.
For this reason, hlsl_resource_load_params now expects both the resource as the sampler to be just an hlsl_ir_node pointer instead of a pointer to a more specific hlsl_ir_load.
---
libs/vkd3d-shader/hlsl.c | 88 +++++++++++++++++++++-- libs/vkd3d-shader/hlsl.h | 5 +- libs/vkd3d-shader/hlsl.y | 128 ++++++++++----------------------- libs/vkd3d-shader/hlsl_codegen.c | 77 ++++++++++++++++++++ tests/hlsl-matrix-indexing.shader_test | 4 +- tests/side-effects.shader_test | 2 +- 6 files changed, 205 insertions(+), 99 deletions(-)