| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Always test for PIPE_TRANSFER_READ/WRITE using the bit-wise and operator, and
add a pipe_transfer_buffer_flags() helper for getting the buffer usage flags
corresponding to them.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
progs/demos/cubemap.c
src/gallium/drivers/softpipe/sp_tex_sample.c
src/gallium/drivers/softpipe/sp_texture.c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Split into component pieces, stitch together at runtime using function
pointers. Make it possible to utilize the existing fastpaths as image-level
filters for generic mip-filtering routines.
Remove special case for rectangle filtering, as it can now be handled by
the 2d path.
As most of the mesa demo texturing was already covered by fast paths, its
harder to find examples of speedups, but tunnel gets a boost as mip-nearest
filtering is now able to access the img_2d_linear_wrap_POT functions
for sampling within a mipmap level.
|
| |
| |
| |
| | |
No performance gain yet, but the code is a bit cleaner.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
We need aditional meta data about the usage of the surface
in softpipe because we need to be able tell the diffrence
between PRIMARY and DISPLAY_TARGET surfaces.
|
| |
| |
| |
| |
| | |
minify() is usually used in mipmap size calculation. Strangely enough,
we all defined it as MAX2(1, d >> 1); imagine that. :3
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
When a texutre transfer is mapped for writing, mark the texture dirty
when unmapped. This was done in surface creation, and this commit moves
it to happen in texture unmapping.
This fixes subtex test in progs/tests/.
Signed-off-by: Chia-I Wu <[email protected]>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/mesa/state_tracker/st_cb_accum.c
src/mesa/state_tracker/st_cb_drawpixels.c
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
move it to pipe/internal/p_winsys_screen.h and start converting
the state trackers to the screen usage
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|