diff options
author | Brian Paul <[email protected]> | 2016-02-09 14:35:31 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-02-09 17:48:25 -0700 |
commit | 5e4de781fadea9e138e722c53a2e72eeb1d41a5a (patch) | |
tree | 6ba010e78914b65994efa4f4c76b7f57e0582a4b /src/mesa/state_tracker/st_context.h | |
parent | 9e2a9d5743246e0fdaa03fe90f8dc341cea10907 (diff) |
st/mesa: fix bitmap texture target code and simplify tex sampler state
Bitmaps may be drawn with a PIPE_TEXTURE_2D or PIPE_TEXTURE_RECT resource
as determined at context creation by checking if PIPE_CAP_NPOT_TEXTURES is
supported. But many places in the bitmap code were hard-coded to use
PIPE_TEXTURE_2D. Use st->internal_target instead.
I think an older NV chip is the only case where a gallium driver does not
support NPOT textures. Bitmap drawing was probably broken for that GPU.
Also, we only need one sampler state with texcoord normalization set up
according to st->internal_target.
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.h')
-rw-r--r-- | src/mesa/state_tracker/st_context.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index 352e795d06a..9a80f4bae70 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -182,7 +182,7 @@ struct st_context /** for glBitmap */ struct { struct pipe_rasterizer_state rasterizer; - struct pipe_sampler_state samplers[2]; + struct pipe_sampler_state sampler; enum pipe_format tex_format; void *vs; struct bitmap_cache *cache; |