| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
When generating a sub-determinate matrix, a 3-element swizzle array was
indexed with clever inline boolean logic. Unfortunately, when i and j
are both 3, the index overruns the array, smashing the next variable on
the stack.
For 64 bit builds, the alignment of the 3-element unsigned array leaves
32 bits of spacing before the next local variable, hiding this bug. On
i386, a subcolumn pointer was smashed then dereferenced.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The adjusted polynomial coefficients come from the numerical
minimization of the L2 norm of the relative error. The old
coefficients would give a maximum relative error of about 15000 ULP in
the neighborhood around acos(x) = 0, the new ones give a relative
error bounded by less than 2000 ULP in the same neighborhood.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The dEQP "precision" test tries to verify that the reference functions
float sinh(float a) { return ((exp(a) - exp(-a)) / 2); }
float cosh(float a) { return ((exp(a) + exp(-a)) / 2); }
float tanh(float a) { return (sinh(a) / cosh(a)); }
produce the same values as the built-ins. We simplified away the
multiplication by 0.5 in the numerator and denominator, and apparently
this causes them not to match for exactly 1 out of 13,632 values.
So, put it back in, fixing the test, but making our code generation
(and precision?) worse.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The if/then/else block was bogus, as it can only take a scalar
condition, and we need to select component-wise. The GLSL IR
implementation of atan2 handles this by looping over components,
but I decided to try and do it vector-wise, and messed up.
For now, just bcsel. It means that we do the atan1 math even if
all components hit the quick case, but it works, and presumably
at least one component will hit the expensive path anyway.
|
|
|
|
|
|
|
|
|
| |
We were botching this for negative numbers - floor of a negative rounds
the wrong way. Additionally, both results are supposed to retain the
sign of the original.
To fix this, just take the abs of both values, then put the sign back.
There's probably a better way to do this, but this works for now.
|
|
|
|
|
|
| |
This is being removed in SPIR-V.
Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15452
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
The uint versions zero extend while the int versions sign extend.
|
| |
| |
| |
| | |
i965/fs was the only consumer, and we're now doing the lowering in NIR.
|
| | |
|
| |
| |
| |
| | |
Strangely the return and parameter types were reversed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I have a patch that writes shaders as .shader_test files, and it uses
this function to create the headers (i.e. [vertex shader]).
[tess ctrl shader] isn't a valid shader_runner header - it's spelled
out as [tessellation control shader].
There's no real reason to abbreviate it, so spell it out.
v2: Rebase on Rob's patches to move the code.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Noticed this with $piglit/bin/vp-address-01
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
nir.h is a bit inconsistent about 'typedef struct {} nir_foo' vs
'typedef struct nir_foo {} nir_foo'. But missing struct name tags is
inconvenient when you need a fwd declaration without pulling in all
of nir.
So add missing struct name tag for nir_variable, and a couple other
spots where it would likely be useful.
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Edward O'Callaghan <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| | |
nir_build_ivec4 is more readable and succinct than using nir_build_imm
directly, even if you have C99.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Before we were asuming that a deref would either be something in a block or
something that we could pass off to NIR directly. However, it is possible
that someone would choose to load/store/copy a split structure all in one
go. We need to be able to handle that.
|
| |
| |
| |
| | |
This makes dealing with single-component derefs easier
|
| |
| |
| |
| |
| | |
This makes them much easier to construct because you can also just specify
a literal number and it doesn't have to be a valid SPIR-V id.
|
| |
| |
| |
| | |
This is similar to what we did for block loads/stores.
|
| |
| |
| |
| |
| | |
This allows us, among other things, to do structure splitting on-the-fly to
more correctly handle input/output structs.
|
| |
| |
| |
| | |
It's 1300 lines all by itself and it will only grow.
|
| |
| |
| |
| |
| |
| |
| | |
Previously, we were creating nir_deref's immediately. Now, instead, we
have an intermediate vtn_access_chain structure. While a little more
awkward initially, this will allow us to more easily do structure splitting
on-the-fly.
|
| | |
|
| |
| |
| |
| |
| | |
Jason left these stray code fragments in
22804de110b97dce1415318fd02c1003e16ef14a.
|
| |
| |
| |
| |
| |
| |
| | |
This currently sets the base and size of all push constants to the
entire push constant block. The idea is that we'll use the base and size
to eventually optimize the amount we actually push, but for now we don't
do that.
|
|\ \ |
|
| | | |
|
| | |
| | |
| | |
| | | |
Signed-off-by: Jordan Justen <[email protected]>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Jordan Justen <[email protected]>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Jordan Justen <[email protected]>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Jordan Justen <[email protected]>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This allows us to first generate atomic operations for shared
variables using these opcodes, and then later we can lower those to
the shared atomics intrinsics with nir_lower_io.
Signed-off-by: Jordan Justen <[email protected]>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously we were receiving shared variable accesses via a lowered
intrinsic function from glsl. This change allows us to send in
variables instead. For example, when converting from SPIR-V.
Signed-off-by: Jordan Justen <[email protected]>
|