Age | Commit message (Collapse) | Author |
|
|
|
The pipe_sampler_view's swizzle terms also apply to the texture border
color. Simply move the apply_sampler_swizzle() call after we fetch
the border color.
Fixes many piglit texwrap failures.
|
|
The trick of casting the coord to an unsigned value only works for POT
textures. Add a bias instead. This fixes a few piglit texwrap failures.
|
|
looks like pot_depth should be used, not pot_height
(found by accident, not verified)
|
|
|
|
Before, changing any of these sampler values triggered generation
of new JIT code. Added a new flag for the special case of
min_lod == max_lod which is hit during auto mipmap generation.
|
|
The old code didn't really make sense. We only need to compare the
X channel of the texture (depth) against the texcoord.
For (bi)linear sampling we should move the calls to this function
and compute the final result as (s1+s2+s3+s4) * 0.25. Someday.
This fixes the glean glsl1 shadow2D() tests. See fd.o bug 29307.
|
|
|
|
|
|
|
|
|
|
...and all texture targets (1D/2D/3D/CUBE).
|
|
This is erroneously throwing non plain formats out of the faster
AoS sampling path.
Doing 8bit interpolation for single channels such as L8 should be no
worse than with floating point. But this may need more investigation.
|
|
|
|
|
|
Searched for them with:
git grep -E '[!=]=.*PIPE_TEXTURE_2D|PIPE_TEXTURE_2D.*[!=]=|case.*PIPE_TEXTURE_2D'
Behavior hasn't been changed.
|
|
|
|
This logic duplicates the one in p_config.h, so remove it and adjust
the only two places that were using it.
|
|
Single divide, so let lp_build_div decide how to implement this.
This will save a multiplication in architectures which don't have
a RCP intrinsic.
|
|
Texture dimensions are unsigned.
|
|
This fixes the assert added in LLVM 2.8:
assert(getType()->isIntOrIntVectorTy() &&
"Tried to create an integer operation on a non-integer type!")
But it also fixes some subtle bugs, since we should've been doing this
since LLVM 2.6 anyway.
Includes a modified patch from steckdenis@yahoo.fr for the
FNeg instructions in emit_fetch(); thanks for pointing those out.
http://bugs.freedesktop.org/29404
http://bugs.freedesktop.org/29407
Signed-off-by: José Fonseca <jfonseca@vmware.com>
|
|
|
|
First, this undoes commit e503af4baa2c709ae5743bb278b277d3faaba076
so we use iround() in lp_build_nearest_mip_level().
Second, in lp_build_sample_general() we need to check if we're sampling
a cube map before anything else. Choose the cube face and then recompute
the partial derivatives of (S,T) with respect to the chosen cube face.
Before, we were using the directional (S,T,R) derivatives to compute
the LOD.
Third, work around an apparent bug in LLVM 2.7 where setting the lod
variable to a const(0) value results in bad x86 code. See comments in
the code.
|
|
Fixes fd.o bug 28036 (piglit fbo-cubemap.c regression)
|
|
Except if it has only one channel, as it would take the same number of
instructions.
|
|
It will be more useful here.
|
|
They need to grow, and they provide basic functionality which is not
specific to sampling.
|
|
Fixes mesa texwrap demo border with GL_CLAMP.
|
|
Always clamp the scaled coordinates.
|
|
|
|
Always clamp with scaled coordinates.
|
|
|
|
Be clear that this parameter returns four texel channel results.
|
|
In particular, don't use the clamped lod to compute level + 1, or
lod in [-1, 0] range will actually interpolate with level 1.
This makes Mipfilter DCT pass 100%.
|
|
|
|
|
|
|
|
|
|
If we're using a wrap mode in which border color sampling is possible
it means that texcoords may be outside of the texture image bounds.
Fetching the texel may result in a segfault.
Use the 'use_border' variable to catch such texcoords and replace
the texel offset with zero (which will be in bounds).
Fixes segfault in Lightsmark demo, fd.o bug 27877.
|
|
|
|
|
|
This allows u_sampler_view_default_dx9_template to do its magic on DX9.
|
|
Fixes glean glsl1 test: texture2D(), with bias.
|
|
This should have been included with the previous commit.
|
|
|
|
|
|
format we can't code LLVM IR directly.
|
|
|
|
|
|
When min_lod==max_lod we don't need to go through all the work of
computing the lod from partial derivatives. This is hit by the mipmap
generation utility code.
|