aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe/sp_texture.c
Commit message (Collapse)AuthorAgeFilesLines
* gallium: Remove remnants of reference counting internals outside of p_refcnt.h.Michel Dänzer2009-03-231-1/+0
|
* softpipe: Use p_atomic_read, not atomic_read.Michal Krol2009-03-161-1/+1
|
* gallium: Use struct pipe_atomic for pipe refcounts.Thomas Hellstrom2009-03-161-1/+1
| | | | Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
* gallium: Unify reference counting.Michel Dänzer2009-03-041-48/+28
| | | | | | | | | | | | | | 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().
* softpipe: minor code simplification for face/zslice offset calculationBrian Paul2009-02-241-7/+10
|
* softpipe: minor code movement in softpipe_get_tex_transfer()Brian Paul2009-02-241-4/+5
|
* Merge branch 'master' into gallium-texture-transferKeith Whitwell2009-02-161-1/+1
|\ | | | | | | | | | | | | Conflicts: src/mesa/state_tracker/st_cb_accum.c src/mesa/state_tracker/st_cb_drawpixels.c
| * softpipe: simplify an assertionBrian Paul2009-02-071-1/+1
| |
* | gallium: No longer allow CPU mapping surfaces directly.Michel Dänzer2009-02-051-23/+91
|/ | | | | | | | | | 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.
* gallium: remove pipe_buffer from surfacesZack Rusin2009-02-021-8/+13
| | | | | | | 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.
* gallium: make p_winsys internalZack Rusin2009-01-301-10/+10
| | | | | move it to pipe/internal/p_winsys_screen.h and start converting the state trackers to the screen usage
* gallium: give the screen priority when it comes to buffer allocationsZack Rusin2009-01-291-9/+9
| | | | | | allows the driver to overwrite buffer allocation, first step on the way to making winsys interface internal to the drivers. state trackers and the code above it will go through the screen
* gallium: Remove the standalone surfaces.José Fonseca2009-01-201-35/+8
| | | | | | | | | | | | | | | | | | | | | | | | | This commit is mostly just a cosmetic change that cleans-up the interfaces, replacing pipe_winsys::surface_* calls by /** * Allocate storage for a display target surface. * * Often surfaces which are meant to be blitted to the front screen (i.e., * display targets) must be allocated with special characteristics, memory * pools, or obtained directly from the windowing system. * * This callback is invoked by the pipe_screenwhen creating a texture marked * with the PIPE_TEXTURE_USAGE_DISPLAY_TARGET flag to get the underlying * buffer storage. */ struct pipe_buffer *(*surface_buffer_create)(struct pipe_winsys *ws, unsigned width, unsigned height, enum pipe_format format, unsigned usage, unsigned *stride); Most drivers were updated but not all were tested. Use the softpipe pipe driver and the xlib winsys changes as a reference when fixing other drivers.
* softpipe: Don't fill surfaces's winsys fields.José Fonseca2008-12-221-2/+0
| | | | | This is sometimes checked to distinguish between texture views and (deprecated) standalone surfaces.
* softpipe: Call surface_alloc_storage to get the pipebuffer for display targets.José Fonseca2008-12-221-15/+34
| | | | | Otherwise blitting from display target surfaces to front screen fails in several platforms.
* softpipe: initialize refcount and winsysJerome Glisse2008-12-221-0/+2
|
* softpipe: convert to use texture instead of surfaceJerome Glisse2008-12-221-35/+30
|
* softpipe: Use pipe_buffer_* inlines as much as possible.José Fonseca2008-09-041-2/+2
|
* gallium: Have pipe_buffer_* receive a pipe_screen instead of a pipe_context.José Fonseca2008-09-031-3/+3
| | | | | We want to use the pipe_buffer_* inlines everywhere, but a pipe context is not always available nor is it needed.
* gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.hBrian Paul2008-08-241-1/+2
| | | | Also, rename p_tile.[ch] to u_tile.[ch]
* softpipe: Compute block size for display targets.José Fonseca2008-07-051-1/+3
|
* softpipe: Implement texture blankets.José Fonseca2008-07-051-0/+34
|
* gallium: Drop pipe_texture->cpp and pipe_surface->cpp.José Fonseca2008-06-271-8/+12
| | | | | The chars-per-pixel concept falls apart with compressed and yuv images, where more than one pixel are coded in a single data block.
* gallium: in softpipe_get_tex_surface() use the pitch specified in the ↵Brian Paul2008-06-231-1/+1
| | | | | | softpipe_texture object. Fixes a pitch/width mix-up.
* gallium: fix some surface usage bugsBrian Paul2008-06-201-2/+9
| | | | | | | | | 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().
* gallium: Propagate tex_usage flags down to winsys.José Fonseca2008-05-071-1/+2
|
* gallium: Add texture usage flags, special-case allocation of display targetsKeith Whitwell2008-05-021-34/+67
| | | | | | | | | | | 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.
* softpipe: use CPU flags for mappingKeith Whitwell2008-05-011-3/+31
| | | | But when creating surfaces, adjust incoming flags from GPU->CPU usage.
* gallium: tex surface checkpointKeith Whitwell2008-05-011-22/+65
|
* gallium: remove temporary _screen suffix from function namesBrian2008-03-221-10/+10
|
* gallium: add face, dirtyLevels params to pipe->texture_update()Brian Paul2008-03-191-1/+2
| | | | | This provides better information about which images in texture object have changed. Also, call texture_update() from more places previously missed.
* gallium: remove DOS carriage returnsBrian2008-03-141-202/+202
|
* gallium: michel's patch to rework texture/sampler binding interfaceKeith Whitwell2008-03-051-202/+202
| | | | | Bind all the samplers/textures at once rather than piecemeal. This is easier for drivers to understand.
* gallium: remove unnecessary assignmentBrian2008-02-271-1/+0
|
* gallium: remove pipe_context->texture_create/release/get_tex_surface()Brian2008-02-271-47/+13
| | | | These functions are now per-screen, not per-context.
* gallium: implement pipe_screen for softpipe driverBrian2008-02-271-8/+49
|
* gallium: softpipe_init_texture_funcs(), make texture func staticBrian2008-02-271-4/+15
|
* gallium: remove pipe parameter from pipe_texture_reference()Brian2008-02-261-0/+1
| | | | | Added pipe field to pipe_texture (temporary, see comments). First step toward context-less texture creation...
* gallium: fix brokenb buildBrian2008-02-221-1/+1
|
* gallium: Fix build on Windows.Michal Krol2008-02-231-1/+1
|
* gallium: replace some ordinary assignments with pipe_reference_texture()Brian2008-02-201-1/+4
| | | | This fixes at least one instance of dereferencing an invalid texture pointer.
* gallium: fix bad ptr comparisonBrian2008-02-201-1/+1
|
* gallium: new pipe->texture_update() functionBrian2008-02-201-0/+15
| | | | | Called whenever texture data is changed (glTexImage, glTexSubImage, glCopyTexSubImage, etc).
* Code reorganization: move files into their places.José Fonseca2008-02-151-0/+166
This is in a separate commit to ensure renames are properly preserved.