José Fonseca
8aafc03b26
gallium: Finer grained is_format_supported.
2008-07-19 12:32:29 +09:00
Brian Paul
2212c214f1
gallium: fix surface memleak in bitmap code
...
Found w/ tunnel2.c demo.
2008-07-03 10:12:37 -06:00
José Fonseca
4ddd659679
gallium: Drop pipe_texture->cpp and pipe_surface->cpp.
...
The chars-per-pixel concept falls apart with compressed and yuv images,
where more than one pixel are coded in a single data block.
2008-06-27 19:37:56 +09:00
José Fonseca
5c1a78b7a8
mesa: More signed/unsigned float/integer fixes.
2008-06-24 13:12:41 +09:00
Brian Paul
318f00ae9f
gallium: need to flush bitmap cache when raster color changes
2008-06-17 12:20:22 -06:00
José Fonseca
53174afeeb
mesa: Apply MSVC portability fixes from Alan Hourihane.
2008-05-31 18:55:40 +09:00
Michel Dänzer
44a7bd0019
gallium: Always unreference bitmap cache texture before resetting the cache.
...
Fixes assertion failure with tunnel2 demo.
2008-05-27 17:00:59 +01:00
Brian Paul
8f792a0707
Merge branch 'gallium-0.1' into gallium-tex-surfaces
2008-05-20 15:12:50 -06:00
Brian Paul
ac09b0e0eb
gallium: fix shader mem leak
2008-05-20 15:11:53 -06:00
Brian Paul
de03e8e960
gallium: remove dead code
2008-05-19 16:07:10 -06:00
Brian Paul
655374bda7
gallium: remove dead code
2008-05-19 16:05:41 -06:00
Brian Paul
b4219e35e2
gallium: fix glBitmap surface memleak in context tear-down
2008-05-16 16:11:00 -06:00
Brian Paul
f3ecd488dd
gallium: remove dead code
2008-05-08 17:11:55 -06:00
Brian Paul
29d9f6b0d2
gallium: no-op st_Bitmap() if width or height is zero
2008-05-08 17:11:05 -06:00
Keith Whitwell
a73ae3d5eb
gallium: Add texture usage flags, special-case allocation of display targets
...
For many envirionments it's necessary to allocate display targets
in a window-system friendly manner. Add facilities so that a driver
can tell if a texture is likely to be used to generate a display surface
and if use special allocation paths if necessary.
Hook up softpipe to call into the winsys->surface_alloc_storage()
routine in this case, though we probably want to change that interface
slightly also.
2008-05-02 16:46:31 +01:00
Keith Whitwell
c9ed86a964
gallium: tex surface checkpoint
2008-05-01 12:00:45 +01:00
Brian Paul
54f94a790e
gallium: use the newer PIPE_FORMAT_x_UNORM format names
2008-04-30 16:51:53 -06:00
Brian Paul
99fba5466b
gallium: use new buffer wrapper functions in p_inlines.h
...
This allows us to remove most of the direct references to winsys in the state tracker.
2008-04-30 10:43:59 -06:00
Brian Paul
7146a1a29d
gallium: consolidate the bitmap->texel conversion code
2008-04-30 10:10:44 -06:00
Brian Paul
d3b98330d8
gallium: create a new texture each time we init/flush the bitmap cache
2008-04-30 10:00:44 -06:00
Brian Paul
eefb9d3b51
gallium: simplify texture format selection
2008-04-30 09:41:55 -06:00
Brian Paul
6fb4009226
gallium: flush pipe before updating bitmap texture
...
Fixes duplicated text bug in progs/tests/texwrap.c
2008-04-29 17:30:21 -06:00
Brian Paul
1cf1641427
gallium: remove unneeded st->bitmap_texcoord_bias
2008-04-25 16:12:11 -06:00
Brian Paul
bceebffc17
gallium: disable the bitmap/texcoord bias
...
Doesn't seem to be needed after fixing the float->int conversion problem.
2008-04-24 13:44:40 -06:00
Brian Paul
a770d40c3d
gallium: use cso_destroy_vertex/fragment_shader() functions
...
Also, rearrange the st_destroy_context() code a bit to prevent some
invalid/NULL ptr derefs during tear-down.
2008-04-24 12:15:05 -06:00
Brian Paul
33f3938d2d
gallium: fix some bitmap frag shader issues
...
If texturing happens to be enabled when glBitmap() is called, need to be
careful about choosing a sampler unit, etc.
2008-04-22 18:43:05 -06:00
Michel Dänzer
fd4acd6fda
gallium: How about restoring shaders instead of saving them again...
2008-04-22 14:22:11 +01:00
Keith Whitwell
01dfa6cde1
use cso fs/vs handle functions
2008-04-21 20:52:54 +01:00
Michel Dänzer
65efe807b9
gallium: Use CSO cache for shaders.
2008-04-21 17:51:39 +01:00
Brian Paul
985134211d
gallium: check ctx->DrawBuffer before flushing bitmap cache.
...
During context unbind, we may not have a draw buffer.
This fixes demos/tunnel2.c
2008-04-07 16:45:17 -06:00
Brian Paul
72f2c55069
gallium: make sure to set the SamplersUsed field for bitmap/drawpixels shaders
...
Also, make sure that field is copied/updated in the program clone and combine functions.
Without this we weren't getting SAMP declarations in the TGSI shaders.
2008-04-04 11:20:44 -06:00
Brian
124e1345c9
gallium: set rasterizer.gl_rasterization_rules = 1 in a few more places
2008-04-03 13:16:37 -06:00
Brian
6b0be38a6c
gallium: used inverted bitmap texture to simplify the fragment shader.
...
"Off" bits get stored as texel=0xff and "on" bits get stored as texel=0x0.
Then use KIL -tmp to kill the off bits and keep the on bits.
This shortens the fragment program by two instructions.
2008-03-31 15:12:14 -06:00
Brian
ddc0f91bfc
gallium: use cso_save/restore_sampler_textures() functions
2008-03-31 14:38:27 -06:00
Brian
6a382250a1
gallium: set the bypass_vs flag now
...
The glBitmap vertex shader is a no-op, but we still have to specify it in
order to convey the number of inputs/outputs.
2008-03-31 14:18:36 -06:00
Brian
e66cb602b7
gallium: turn on clipping for bitmaps
...
Bitmaps can extend beyond window edges so we need to clip.
Also, move some state atom vars to st_context to be a bit more efficient.
2008-03-31 12:18:20 -06:00
Brian
737e34aee5
gallium: begin some bounding box code for bitmap cache
2008-03-28 18:41:10 -06:00
Brian
f6908a766d
gallium: added an (int) cast in setup_bitmap_vertex_data() to fix a signed/unsigned arithmetic problem
...
Negative values became very large uints.
2008-03-28 18:18:55 -06:00
Brian
7292db2138
gallium: disable a debug hack
2008-03-28 14:56:05 -06:00
Brian
c62b197b52
gallium: implement a glBitmap cache
...
The bitmap cache attempts to accumulate a series of glBitmap calls in a
buffer to effectively render a whole bunch of bitmaps at once.
The cache can be disabled, if needed, by setting UseBitmapCache=GL_FALSE.
2008-03-28 14:53:47 -06:00
Brian
6f8286163c
gallium: Update calls to the simple shader functions
2008-03-27 15:43:32 -06:00
Brian Paul
1ecb2e4a7a
gallium: need to call st_validate_state() in Bitmap()
2008-03-26 09:02:54 -06:00
Brian Paul
22a3d02254
gallium: free bitmap fragment shaders, misc clean-up
2008-03-24 11:56:05 -06:00
Brian Paul
d246274b9c
gallium: add missing cso_save_samplers() call
2008-03-24 11:56:05 -06:00
Brian
a39091bc5b
Refactor PBO validate/map code.
...
We always need to do PBO validation, so do that in core Mesa before calling driv
er routine.
cherry-picked from Mesa/master.
2008-03-21 14:20:07 -06:00
Brian Paul
f1626f0bfd
gallium: implement PBO operations for glDraw/ReadPixels and glBitmap
...
At this time there are no optimizations for directly blitting between
buffer objects and surfaces (always go through mappings).
glean pbo test passes now
2008-03-21 13:44:27 -06:00
Brian
3ece9ace54
gallium: glBitmap code now separated from glDraw/CopyPixels code
2008-03-20 15:04:08 -06:00