On Fri, 5 Jun 2020 at 20:04, Zebediah Figura zfigura@codeweavers.com wrote:
If we extend the above proposal, perhaps something like:
#define VKD3D_ARRAY_COUNT_UNBOUNDED (~0)
struct vkd3d_uav_scan_info { unsigned int register_space, register_index, array_count; bool counter, read; }
array_count doesn't necessarily have to reflect the actual declared array count (unless there's a reason to do that I'm not thinking of?)
Thus if the array isn't indexed dynamically, we can fill one vkd3d_uav_scan_info entry for each access, each with an array_count of
- If it is, we add one entry with the declared array count or
VKD3D_ARRAY_COUNT_UNBOUNDED (if it's indexed dynamically). Does that work?
Probably something along those lines, yeah. Although perhaps it makes more sense to store "unbounded" as a flag, like "counter" and "read", and then just set "count" to 0.