Age | Commit message (Collapse) | Author |
|
minify() is usually used in mipmap size calculation. Strangely enough,
we all defined it as MAX2(1, d >> 1); imagine that. :3
|
|
|
|
|
|
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().
|
|
|
|
|
|
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.
|
|
|
|
|
|
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 two functions are identical. Removed align_int() from p_util.h
|
|
This reverts commit 930a863c4f6f11d0fd5cf396ef76054d52c69b9f.
|
|
|
|
|
|
|
|
The chars-per-pixel concept falls apart with compressed and yuv images,
where more than one pixel are coded in a single data block.
|
|
|
|
|
|
This is step towards tiled textures and buffer support for
i915. But the tiled attribute is never set.
|
|
All offsets are now on image_offset.
|
|
Apprently we shouldn't do all the advanced layout
operation for none compressed formats.
The compressed code was also broken, its currently
disabled, but should be fixed once i915simple starts
to support compressed formats.
|
|
|
|
|
|
trivial/clear-undefined still fails
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This provides better information about which images in texture object have changed.
Also, call texture_update() from more places previously missed.
|
|
|
|
These functions are now per-screen, not per-context.
|
|
This will allow creating textures before a rendering context exists, for example.
Only implemented in i915 driver for now. i915pipe->texture_create() just
dispatches through to the i915screen->texture_create() to avoid state tracker
changes for now.
|
|
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.
|