Age | Commit message (Collapse) | Author |
|
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.
|
|
This is sometimes checked to distinguish between texture views and
(deprecated) standalone surfaces.
|
|
Otherwise blitting from display target surfaces to front screen fails in
several platforms.
|
|
|
|
|
|
|
|
We want to use the pipe_buffer_* inlines everywhere, but a pipe context
is not always available nor is it needed.
|
|
Also, rename p_tile.[ch] to u_tile.[ch]
|
|
|
|
|
|
The chars-per-pixel concept falls apart with compressed and yuv images,
where more than one pixel are coded in a single data block.
|
|
softpipe_texture object.
Fixes a pitch/width mix-up.
|
|
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().
|
|
|
|
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.
|
|
But when creating surfaces, adjust incoming flags from GPU->CPU usage.
|
|
|
|
|
|
This provides better information about which images in texture object have changed.
Also, call texture_update() from more places previously missed.
|
|
|
|
Bind all the samplers/textures at once rather than piecemeal.
This is easier for drivers to understand.
|
|
|
|
These functions are now per-screen, not per-context.
|
|
|
|
|
|
Added pipe field to pipe_texture (temporary, see comments).
First step toward context-less texture creation...
|
|
|
|
|
|
This fixes at least one instance of dereferencing an invalid texture pointer.
|
|
|
|
Called whenever texture data is changed (glTexImage, glTexSubImage,
glCopyTexSubImage, etc).
|
|
This is in a separate commit to ensure renames are properly preserved.
|