[v2 1/2] d3dx9: Support relative addressing in preshader.
Paul Gofman
gofmanp at gmail.com
Mon Apr 10 05:13:02 CDT 2017
On 04/09/2017 08:40 PM, Matteo Bruni wrote:
> It looks to me as the CLIT section in the bytecode you attached
> contains 16 as the constants count. Not sure why the print below
> doesn't match that.
>
> Either way, it doesn't matter much. Even if immediate counts
> non-multiple-of-4 can actually exist we could (and I argue, should)
> bump that up to the next multiple, zeroing the extra components.
>
Oh, it must be due to the code for updating constant table size
under discussion does not respect scalar op flag, and 18 constants here
reveals that (as the constant used in the instruction causing actual
size update is using just 1 constant for all 3 components, not 3). It is
not good by itself, in particular, it can break index wrap logic. For
the same index wrap logic we can't just bump to next multiple of 4, if
the cases where the count is not the multiple actually exist (I am not
sure anymore that they do). So I will fix that update for scalar op case
at some point, do some more testing and either send the fix or change
the constant components count to 4, with a fail on preshader creation if
it is not the case.
More information about the wine-devel
mailing list