José Fonseca
b7b07b0029
softpipe: Rename pipe formats.
2010-03-02 10:21:54 +00:00
José Fonseca
28486880ca
gallium: pipe/p_inlines.h -> util/u_inlines.h
2010-02-02 14:42:17 +00:00
Michal Krol
b1ed72ebe2
Move the remaining format pf_get_* functions to u_format.h.
...
Previously they depended on format blocks, but after removing those
they started depending on format encoding.
2009-12-17 23:41:57 +01:00
Michal Krol
16c6dce013
Merge branch 'master' into pipe-format-simplify
...
Conflicts:
src/gallium/auxiliary/draw/draw_pipe_aaline.c
src/gallium/auxiliary/draw/draw_pipe_pstipple.c
src/gallium/auxiliary/util/u_blit.c
src/gallium/auxiliary/util/u_gen_mipmap.c
src/gallium/auxiliary/util/u_surface.c
src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c
src/gallium/drivers/cell/ppu/cell_texture.c
src/gallium/drivers/llvmpipe/lp_texture.c
src/gallium/drivers/r300/r300_emit.c
src/gallium/drivers/r300/r300_texture.c
src/gallium/drivers/softpipe/sp_texture.c
src/gallium/drivers/softpipe/sp_tile_cache.c
src/gallium/drivers/svga/svga_state_vs.c
src/gallium/include/pipe/p_format.h
src/gallium/state_trackers/dri/dri_drawable.c
src/gallium/state_trackers/egl/egl_surface.c
src/gallium/state_trackers/python/p_device.i
src/gallium/state_trackers/python/st_softpipe_winsys.c
src/gallium/state_trackers/vega/api_filters.c
src/gallium/state_trackers/vega/image.c
src/gallium/state_trackers/vega/mask.c
src/gallium/state_trackers/vega/paint.c
src/gallium/state_trackers/vega/renderer.c
src/gallium/state_trackers/vega/vg_tracker.c
src/gallium/state_trackers/xorg/xorg_crtc.c
src/gallium/state_trackers/xorg/xorg_dri2.c
src/gallium/state_trackers/xorg/xorg_exa.c
src/gallium/state_trackers/xorg/xorg_renderer.c
src/gallium/state_trackers/xorg/xorg_xv.c
src/gallium/state_trackers/xorg/xvmc/surface.c
src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
src/gallium/winsys/drm/radeon/core/radeon_buffer.c
src/gallium/winsys/egl_xlib/sw_winsys.c
src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c
src/gallium/winsys/gdi/gdi_softpipe_winsys.c
src/gallium/winsys/xlib/xlib_cell.c
src/gallium/winsys/xlib/xlib_llvmpipe.c
src/gallium/winsys/xlib/xlib_softpipe.c
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_texture.c
2009-12-17 22:37:15 +01:00
Michal Krol
cceeab39ea
Move pf_get_bits/size() to u_format auxiliary module.
2009-12-03 11:17:37 +01:00
Roland Scheidegger
ac400ffce6
gallium: interface cleanups, remove nblocksx/y from pipe_texture and more
...
This patch removes nblocksx, nblocksy arrays from pipe_texture (can be
recalculated if needed). Furthermore, pipe_format_block struct is gone
completely (again, contains just derived state).
nblocksx, nblocksy, block are also removed from pipe_transfer, together with
the format enum (can be obtained from the texture associated with the transfer).
2009-11-30 20:29:18 +01:00
Brian Paul
57e3eb1b17
Merge branch 'mesa_7_6_branch'
2009-10-10 09:25:34 -06:00
Brian Paul
768481ed40
softpipe: revert 564df9dc5f
...
This change silenced valgrind warnings but broke progs/tests/drawbuffers.
The problem is we don't know the surface's state when we start caching it
(it may or may not be initialized/cleared/etc). So "clearing" it here was
presumptuous. Leaving the code in place (but disabled) for reference and
when using valgrind.
Fixes bug 24401
2009-10-10 09:18:14 -06:00
Brian Paul
124f5875ea
Merge branch 'mesa_7_6_branch'
...
Conflicts:
Makefile
configs/default
docs/relnotes.html
src/gallium/drivers/softpipe/sp_context.c
src/gallium/drivers/softpipe/sp_tile_cache.c
src/mesa/main/version.h
2009-09-29 09:46:49 -06:00
Brian Paul
564df9dc5f
softpipe: initialize the clear_flags bitvector in sp_create_tile_cache()
...
This silences tons of valgrind warnings in programs that don't call
glClear(), such as progs/demos/gamma.
2009-09-29 08:51:00 -06:00
Brian Paul
de25f82067
Merge branch 'mesa_7_6_branch'
...
Conflicts:
src/gallium/drivers/softpipe/sp_tile_cache.c
2009-09-23 11:00:04 -06:00
Brian Paul
e41707beca
softpipe: added max texture/surface size sanity check
2009-09-23 10:50:38 -06:00
Brian Paul
84b956c29b
softpipe: increase MAX_WIDTH/HEIGTH 4096 to match max texture size
2009-09-23 10:46:27 -06:00
Keith Whitwell
7670102468
Merge branch 'tex-tilecache' into softpipe-opt
...
Conflicts:
src/gallium/drivers/softpipe/sp_state_derived.c
src/gallium/drivers/softpipe/sp_state_sampler.c
src/gallium/drivers/softpipe/sp_tex_sample.c
src/gallium/drivers/softpipe/sp_tex_sample.h
src/gallium/drivers/softpipe/sp_tile_cache.c
2009-08-23 10:23:46 +01:00
Brian Paul
3adc8c3779
softpipe: minor code refactoring to remove softpipe/tile cache dependencies
...
The tile cache code now has no hard dependencies on softpipe.
2009-08-21 14:01:58 -06:00
Keith Whitwell
c84abe36a9
softpipe: fix typo in clear_tile
2009-08-18 16:55:10 +01:00
Keith Whitwell
80c78472ad
softpipe: split texture and surface tile caches
...
These do similar jobs but with largely disjoint code. Will want
to evolve them separately going forward.
2009-08-18 16:55:10 +01:00
Keith Whitwell
19097907ef
softpipe: also shortcircuit non-texture tile lookups
2009-07-23 09:35:33 +01:00
Keith Whitwell
f911c3b989
softpipe: shortcircuit repeated lookups of the same tile
...
The sp_tile_cache is often called repeatedly to look up the same
tile. Add a cache (to the cache) of the single tile most recently
retreived and make a quick inline check to see if this matches the
subsequent request.
Add a tile_address bitfield struct to make this check easier.
2009-07-22 15:08:42 +01:00
Keith Whitwell
b5d583efef
softpipe: make some small steps to flush texture cache less frequently
...
No performance gain yet, but the code is a bit cleaner.
2009-07-22 12:48:00 +01:00
Keith Whitwell
aa5db68438
softpipe: remove backwards dependency from tilecache to softpipe
...
The tile cache is a utility, it shouldn't know anything about the
entity which is making use of it (ie softpipe).
Remove softpipe parameter to all the tilecache function calls, and
also remove the need to keep a softpipe pointer in the sampler structs.
2009-07-22 12:47:59 +01:00
Brian Paul
f4d744af24
softpipe: clean up the buffer clear and tile cache code a little
2009-04-06 15:31:58 -06:00
Brian Paul
5d3b1494b6
softpipe: add additional surface formats in tile cache code
2009-04-03 15:43:13 -06:00
Brian Paul
9808ae688a
softpipe: more texture transfer fixes.
...
Need to null-out pointers after freeing transfer objects.
Fix mix-ups between tc->transfer and tc->tex_trans fields.
2009-03-18 10:24:19 -06:00
Brian Paul
71e3aa14fb
softpipe: need to set tc->transfer=NULL after destroying the transfer object
...
This fixes a number of crashes/regressions in programs such as lodbias.c,
mipmap_limits.c, etc.
2009-03-18 10:24:19 -06:00
Michel Dänzer
5e27cd46c0
gallium: Unify reference counting.
...
The core reference counting code is centralized in p_refcnt.h.
This has some consequences related to struct pipe_buffer:
* The screen member of struct pipe_buffer must be initialized, or
pipe_buffer_reference() will crash trying to destroy a buffer with reference
count 0. u_simple_screen takes care of this, but I may have missed some of
the drivers not using it.
* Except for rare exceptions deep in winsys code, buffers must always be
allocated via pipe_buffer_create() or via screen->*buffer_create() rather
than via winsys->*buffer_create().
2009-03-04 11:58:48 +01:00
Michel Dänzer
3bd7c5ceff
Merge branch 'gallium-texture-transfer'
...
Conflicts:
src/gallium/drivers/softpipe/sp_tile_cache.c
2009-02-18 16:43:02 +01:00
Brian Paul
07855a1d76
softpipe: some improvements to texture tile cache
...
Use a somewhat better function in tex_cache_pos() to get better caching.
Increase number of cache entries to 50.
Also fix a texture invalidation bug. If texture is marked as modified,
invalidate all texture tiles.
2009-02-16 18:53:45 -07:00
Michel Dänzer
5af34758e3
gallium: Fix a couple of potential NULL pointer dereferences.
...
A lot more test programs work.
2009-02-12 20:13:36 +01:00
Michel Dänzer
2142bf5e17
softpipe: Unbreak keeping track of cached surface.
...
glxgears works.
2009-02-12 19:43:43 +01:00
Michel Dänzer
479d929530
Cosmetic: Rename struct pipe_transfer pointers from 'ps' to 'pt'.
...
Missed these for the initial gallium-texture-transfer commit.
2009-02-12 19:39:30 +01:00
Michel Dänzer
4617981ec7
gallium: No longer allow CPU mapping surfaces directly.
...
Instead, a new pipe_transfer object has to be created and mapped for
transferring data between the CPU and a texture. This gives the driver more
flexibility for textures in address spaces that aren't CPU accessible.
This is a first pass; softpipe/xlib builds and runs glxgears, but it only shows
a black window. Looks like something's off related to the Z buffer, so the
depth test always fails.
2009-02-05 19:41:18 +01:00
Zack Rusin
5069bfed29
gallium: remove pipe_buffer from surfaces
...
this change disassociates, at least from the driver perspective,
the surface from buffer. surfaces are technically now views on the
textures so make it so by hiding the buffer in the internals of
textures.
2009-02-02 23:47:16 -05:00
Brian
0b9e96fae9
softpipe: remove old/unneeded dependencies between TGSI exec and softpipe
...
Use tgsi_sampler struct as a base class. Softpipe subclasses it and adds
the fields it needs.
2008-11-23 19:15:15 -07:00
Brian Paul
4f25420bdd
gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.h
...
Also, rename p_tile.[ch] to u_tile.[ch]
2008-08-24 17:48:55 -06:00
Brian Paul
fdb7dc889f
softpipe: add support for PIPE_FORMAT_X8Z24_UNORM, PIPE_FORMAT_Z24X8_UNORM
2008-08-07 15:14:52 -06:00
José Fonseca
fd6865c7e5
softpipe: Remove unused variables.
2008-07-24 21:23:09 +09:00
José Fonseca
36dd89c8a7
util: Eliminate pipe from the arguments to pipe_get/put_tile_xxx functions.
...
You don't need a pipe_context * for this, and all other necessary info is
already inside pipe_surface.
2008-07-13 23:37:40 +09:00
Brian Paul
f38bb10969
gallium: fix some surface usage bugs
...
When a surface is created with GPU_WRITE that really means "GPU render"
and that can involve reads (blending). Set surface usage to
PIPE_BUFFER_USAGE_CPU_READ + WRITE. Fixes progs/demos/lodbias demo.
Also, mark texture as 'modified' when mapped for writing so that the tile
cache can know when to freshen a cached tile. Fixes glTexSubImage2D().
2008-06-20 15:58:19 -06:00
Brian Paul
12bb907522
gallium: fix some PIPE_FORMAT_Z24S8_UNORM bugs in softpipe driver
2008-05-30 15:07:58 -06:00
Keith Whitwell
09e6be9b57
Merge commit 'origin/gallium-0.1' into gallium-tex-surfaces
...
Conflicts:
src/mesa/state_tracker/st_atom_sampler.c
src/mesa/state_tracker/st_cb_texture.c
2008-05-06 07:45:28 +01:00
Brian Paul
cc2af38f2a
gallium: fix typos, comments, whitespace
2008-05-02 09:31:38 -06:00
Keith Whitwell
27e46611f0
softpipe: use CPU flags for mapping
...
But when creating surfaces, adjust incoming flags from GPU->CPU usage.
2008-05-01 12:00:45 +01:00
Keith Whitwell
c9ed86a964
gallium: tex surface checkpoint
2008-05-01 12:00:45 +01:00
Brian Paul
18f4d96265
gallium: replace old PIPE_FORMAT_U_S8 with PIPE_FORMAT_S8_UNORM
2008-04-30 16:51:52 -06:00
Keith Whitwell
09b6686158
softpipe: make NUM_ENTRIES 32 so that div/mods are easier
2008-04-22 11:02:24 +01:00
Brian
4b39ba7216
gallium: set tc->surface_map = NULL after unmapping
2008-03-19 11:14:18 -06:00
Brian
6f715dcc21
gallium: remove pipe_context->texture_create/release/get_tex_surface()
...
These functions are now per-screen, not per-context.
2008-02-27 14:21:12 -07:00
Brian
4da19dbcaa
gallium: remove pipe parameter from pipe_texture_reference()
...
Added pipe field to pipe_texture (temporary, see comments).
First step toward context-less texture creation...
2008-02-26 19:31:22 -07:00
Brian
d5640a2dbd
gallium: new pipe->texture_update() function
...
Called whenever texture data is changed (glTexImage, glTexSubImage,
glCopyTexSubImage, etc).
2008-02-20 13:24:52 -07:00