Age | Commit message (Collapse) | Author |
|
We could use single 1 bit conditions for scalar masks, but a lot of code
expects masks. The compiler easily optimzes away masks
extensions/truncations so consistency is preferable.
We can revisit this when LLVM backends have more support for vector
conditions.
|
|
|
|
The new lp_build_sample_general() function will handle all sampling
modes for all texture types. Still incomplete, but a few additional
sampling modes are now supported.
1D textures should work and most of the code for 3D textures is in place.
No support for cube maps yet. No support for different min/mag filters.
|
|
|
|
|
|
Time to start consolidating some code...
|
|
|
|
Instead of testing each component individually, we can test the entire
vector at once.
|
|
makes loops work
|
|
|
|
Only works well with LLVM >= 2.7
|
|
The LOD is computed from texcoord partial derivatives and used to
select a mipmap level. Still some bugs in texel fetching. Lots of
rough edges and unfinished parts but the basics are in place.
Lots of changes to the lp_bld_arit.c code to support non-vector/scalar
datatypes.
|
|
Change the texture data_ptr from just a single image pointer to an
array of image pointers, indexed by mipmap level.
We'll use this for mipmap filtering.
For now, the mipmap level is hard-coded to zero.
|
|
|
|
|
|
Fixes use of uninitialized variables in non-debug builds.
|
|
Recover some logic to make state canonical, although it is admittedly very
shy compared with what could be done.
We really need an helper module to make state canonical.
|
|
This reverts commit 71c05689528d7987bfb99c3afe04e456887bc7b7.
|
|
|
|
The signatures for pack intrinsics were made more consistent in this
version.
|
|
|
|
|
|
|
|
|
|
|
|
Note that only the PIPE_TEX_WRAP_CLAMP,CLAMP_TO_EDGE,CLAMP_TO_BORDER
modes work with non-normalized texcoords.
|
|
The progs/test/texwrap demo looks pretty good, but there are still some
tiny differences from softpipe. There may be a sub-pixel texcoord
interpolation error somewhere.
There's some room for optimization. Many of the wrap modes compute
intermediate values that are constant for the texture size (see the
min/max values). These could be computed earlier and stored somewhere
for later use.
|
|
|
|
|
|
|
|
All the texture wrap modes are now implemented for linear and nearest
sampling.
However, texture border color is not yet supported so some wrap modes
will produce int coords outside the texture bounds. We'll get garbage
values insted of the texture border color for now.
|
|
|
|
|
|
|
|
The lp_int_type() function was creating an unsigned type. So rename
that function to lp_uint_type() and create new lp_int_type() that
creates a signed type.
|
|
|
|
|
|
else was broken in the outter most else statemants, plus the code
didn't need an inverted mask to compute the inverse of the current
condition.
|
|
implements if/else/endif constructs and lays down the code for looping
and others. we create a conditional execution mask which decides which
of the four inputs are enabled for any store. it's used only if an
execution mask is present, otherwise we go through a direct store.
|
|
|
|
|
|
|
|
Avoids assertion failures with certain shaders.
|
|
Note that with FIXME instead of an assertion failure.
Addresses fdo 25956.
|
|
|
|
with mutable vars we don't need to follow the phi nodes. meaning that
control flow becomes trivial as we don't have scan the rest of the tgsi
to figure out the variable usage anymore. futhermore the memory2register
pass promotes alloca/store/load to registers while inserting the right phi
nodes. so we get simplicity and performance.
|
|
the llvmpipe tgsi translation is a lot more complete than what was in
gallivm so replacing the latter with the former. this is needed since
the draw llvm paths will use the same code. effectively the proven
llvmpipe code becomes gallivm.
|
|
This is to differentiate it from its unsigned version, TGSI_OPCODE_USHR.
|
|
|
|
Makes integration of gallium into out of tree components much easier. No
pratical change for components in this tree,
|