| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two usage types of buffer CPU accesses:
One where we try to use the buffer contents for multiple draw commands in
a batch. (batch := sequence of commands that are flushed together),
like incrementally adding bitmaps to a bitmap texture that is reallocated
on flush.
And one where we assume we can safely overwrite the old buffer contexts, like
glTexSubImage. In this case we need to make sure all old drawing commands
referencing the buffer are flushed before we map the buffer.
This is easily forgotten.
Add wrappers for the most common of these operations. The first type is
prefixed with "st_no_flush" and the second type is prefixed with
"st_cond_flush", where "cond" indicates that we attmpt to only flush
if there is indeed unflushed draw commands referencing the buffer.
Prefixed functions are
screen::get_tex_transfer
pipe_buffer_write
pipe_buffer_read
pipe_buffer_map
Please use the wrappers whenever possible.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
|
|
|
|
|
|
| |
There's really no need for two negation fields. This came from the
GL_NV_fragment_program extension. The new, unified Negate bitfield applies
after the absolute value step.
|
|
|
|
| |
We can determine if the texture is compressed by checking the format.
|
|
|
|
|
|
|
|
|
| |
The draw module provides a similar interface to the driver which
is retained as various bits of hardware may be able to take on
incremental parts of the vertex pipeline. However, there's no
need to advertise all this complexity to the state tracker.
There are basically two modes now - normal and passthrough/screen-coords.
|
|
|
|
|
|
|
|
| |
Any driver who needs a copy of the shader tokens must organize to
do so itself. This has been the case for a long time, but there
was still defensive code in the state tracker, which is now removed.
Any bugs resulting from this need to be fixed in the offending driver...
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
| |
Also don't send the partial program fragment down to hardware -- the
program will never be used in that form.
|
|
|
|
| |
Saves code, and will simplify future interface changes.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/mesa/state_tracker/st_cb_accum.c
src/mesa/state_tracker/st_cb_drawpixels.c
|
| | |
|
| |
| |
| |
| |
| | |
Use _mesa_malloc(), _mesa_free(), etc everywhere, not malloc(), free(), etc.
Still using CALLOC_STRUCT() at this point.
|
|/
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| | |
Conflicts:
src/gallium/winsys/gdi/SConscript
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Quite a few util modules were maintaining a single vertex buffer over multiple
frames, and potentially reusing it in subsequent frames. Unfortunately that
would force us into syncrhonous rendering as the buffer manager would be
forced to wait for the previous rendering to complete prior to allowing the
map.
This resolves that issue, but requires the state tracker to issue a few new
flush() calls at the end of each frame.
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
src/gallium/auxiliary/tgsi/tgsi_sse2.c
|
| |
| |
| |
| |
| |
| | |
By time we get around to rendering the cached bitmap, the current color may
have changed. Need to make sure we load the constant slot with the cached
color.
|
|/
|
|
| |
Use pipe_buffer_reference instead.
|
|
|
|
|
| |
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]
|
| |
|
|
|
|
| |
Found w/ tunnel2.c demo.
|
|
|
|
|
| |
The chars-per-pixel concept falls apart with compressed and yuv images,
where more than one pixel are coded in a single data block.
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes assertion failure with tunnel2 demo.
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
| |
|
|
|
|
| |
This allows us to remove most of the direct references to winsys in the state tracker.
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes duplicated text bug in progs/tests/texwrap.c
|
| |
|
|
|
|
| |
Doesn't seem to be needed after fixing the float->int conversion problem.
|
|
|
|
|
| |
Also, rearrange the st_destroy_context() code a bit to prevent some
invalid/NULL ptr derefs during tear-down.
|
|
|
|
|
| |
If texturing happens to be enabled when glBitmap() is called, need to be
careful about choosing a sampler unit, etc.
|
| |
|