aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_texture.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa/st: restore flush to copy_texsubimage (was previously finish)Keith Whitwell2009-06-011-0/+3
| | | | Need a flush here even though the original finish was overkill.
* st/gl: Fix mip gen for compressed texturesJakob Bornecrantz2009-06-011-6/+8
|
* mesa/st: keep surface_copy arguments positiveKeith Whitwell2009-05-081-0/+28
| | | | | | | The src/dest x,y, and w,h arguments of the pipe->surface_copy function are unsigned and the drivers aren't expecting negative (or extremly-large unsigned) values as inputs. Trim the requests at the state-tracker level before passing down.
* mesa/st: remove redundant call to st_finish in CopyTexSubImageKeith Whitwell2009-05-081-3/+0
| | | | | Rendering should already have been flushed, any synchronization will be done by the driver or memory manager.
* mesa/st: workaround for crashes in st_copy_texsubimageKeith Whitwell2009-04-281-0/+10
| | | | Proper fix for this hasn't been identified, but avoid crashing.
* mesa/st: fix incorrect face, level in compress_with_blitKeith Whitwell2009-04-271-2/+1
| | | | | | | We were incorrectly applying the destination texture face and level when requesting a transfer to the temporary texture, which has only one face and level. This would obviously cause problems uploading to compressed cube and mipmap textures.
* mesa: Handle failure to create a transfer.José Fonseca2009-04-201-1/+2
|
* gallium: Create OGL state tracker wrappers for various CPU access operations.Thomas Hellstrom2009-04-171-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge branch 'gallium-s3tc'José Fonseca2009-04-161-6/+260
|\
| * st: remove XXX commentBrian Paul2009-04-151-1/+0
| |
| * st: check for fast memcpy path in decompress_with_blit()Brian Paul2009-04-151-13/+33
| |
| * st: decompress_with_blit() path for glGetTexImage().Brian Paul2009-04-151-2/+81
| | | | | | | | Decompress a texture by rendering a textured quad.
| * st: If the hw supports it do hw conversion of texture uploadsJakob Bornecrantz2009-04-091-4/+160
| |
* | gallium: Make sure we flush before some texture / buffer operations.Thomas Hellstrom2009-04-151-0/+17
| | | | | | | | | | | | | | Also implement context member functions to optimize away those flushes whenever possible. Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
* | mesa: Fix gcc assembly enable logic.José Fonseca2009-04-141-1/+1
|/ | | | The i386 symbol is defined on WINDDK.
* st: remove another unneeded 'is compressed' comparisonBrian Paul2009-04-091-2/+3
|
* st: remove comp_byte parameter to st_texture_create()Brian Paul2009-04-091-9/+3
| | | | We can determine if the texture is compressed by checking the format.
* st: consolidate format->usage computationBrian Paul2009-04-091-9/+23
|
* st: add const qualifiers, use GL typesBrian Paul2009-04-091-13/+10
|
* st: make loops over 3D texture slices a litte more intuitiveBrian Paul2009-04-091-10/+16
|
* st: reformatting and clean-ups in texture codeBrian Paul2009-04-091-95/+67
|
* st: implement glCopyTexImage() for GL_DEPTH24_STENCIL8 internal formatBrian Paul2009-04-071-2/+4
|
* mesa: move glGetTexImage(), glGetCompresssedTexImage() code into new fileBrian Paul2009-04-031-0/+1
|
* st: init the default texture to (0,0,0,1)Brian Paul2009-03-261-2/+12
| | | | | The default texture is used when a sampler uses an incomplete texture. This change fixes the piglit fp-incomplete test.
* st: Silence compiler warnings.Michal Krol2009-03-211-2/+2
|
* st/gl: Only transfer needed parts in st_TexSubimageJakob Bornecrantz2009-03-191-4/+2
|
* st: need to free/realloc pipe texture when we're handed image level > last_levelBrian Paul2009-03-181-0/+1
| | | | Fixes progs/tests/tri-fbo-tex-mip.c
* st: clean up some if-statment codeBrian Paul2009-03-181-12/+11
|
* gallium: Remove do_flip argument from surface_copyJakob Bornecrantz2009-03-131-6/+3
| | | | | | | I should have gotten most uses and implementation correctly fixed, but things might break. Feel free to blame me.
* gallium: use unsigned long to silence warnings with 64-bit buildBrian Paul2009-03-071-1/+1
|
* gallium: Unify reference counting.Michel Dänzer2009-03-041-8/+8
| | | | | | | | | | | | | | 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().
* mesa: move a bunch of compiler-related stuff into new compiler.h headerBrian Paul2009-02-221-1/+2
| | | | This trims down and cleans up imports.h and glheader.h quite a bit.
* Merge branch 'master' into gallium-texture-transferKeith Whitwell2009-02-161-5/+3
|\ | | | | | | | | | | | | Conflicts: src/mesa/state_tracker/st_cb_accum.c src/mesa/state_tracker/st_cb_drawpixels.c
| * mesa: use new ST_CALLOC_STRUCT() macro in gallium state trackerBrian Paul2009-02-121-2/+2
| |
| * mesa: Compare formats using nominal bytes per pixel.José Fonseca2009-02-101-3/+1
| | | | | | | | | | | | | | This is a temporary fix which works for the formats we care so far. The real fix would be abandon the concept "nominal bytes per pixel" entirely in Mesa, and use macropixels instead, as done in gallium interfaces already.
* | gallium: Various coordinate fixups for texture transfers.Michel Dänzer2009-02-131-3/+3
| | | | | | | | Fixes glReadPixels, gl(Copy)TexSubImage, glCopyPixels.
* | gallium: No longer allow CPU mapping surfaces directly.Michel Dänzer2009-02-051-57/+50
|/ | | | | | | | | | 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.
* Merge commit 'origin/gallium-0.1' into gallium-0.2Brian Paul2008-10-171-2/+2
|\ | | | | | | | | | | Conflicts: progs/trivial/tri.c
| * gallium: fix mis-matched malloc/free vs. aligned malloc/freeBrian Paul2008-10-171-2/+2
| | | | | | | | | | Use aligned malloc/free for teximage data everywhere to be consistant. The mismatch didn't make any difference when HAVE_POSIX_MEMALIGN was defined.
* | Merge commit 'origin/gallium-0.1' into gallium-0.2Keith Whitwell2008-10-101-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/gallivm/instructionssoa.cpp src/gallium/auxiliary/gallivm/soabuiltins.c src/gallium/auxiliary/rtasm/rtasm_x86sse.c src/gallium/auxiliary/rtasm/rtasm_x86sse.h src/mesa/main/texenvprogram.c src/mesa/shader/arbprogparse.c src/mesa/shader/prog_statevars.c src/mesa/state_tracker/st_draw.c src/mesa/vbo/vbo_exec_draw.c
| * mesa: fix convolve/convolution mix-upsBrian2008-10-061-2/+2
| |
* | mesa: remove const qualifiers to match device driver interface functionBrian Paul2008-09-261-2/+2
|/
* gallium: if we run out of memory in st_TexImage, flush and try again.Brian Paul2008-09-181-2/+9
| | | | | If the driver buffers a scene flushing should release old textures and make space for new ones. Fixes problem with texdown.c test.
* gallium: need to finish, not flush, in st_copy_texsubimage()Brian Paul2008-09-171-1/+2
|
* gallium: fix glTexImage(width=height=depth=0) caseBrian Paul2008-09-161-0/+5
| | | | Free old teximage/level data, then stop.
* gallium: move st_texture_image() cast wrapper to header fileBrian Paul2008-09-011-7/+0
|
* gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.hBrian Paul2008-08-241-1/+1
| | | | Also, rename p_tile.[ch] to u_tile.[ch]
* gallium: fix do_flip bug on glCopyTexImage / surface_copy() pathBrian Paul2008-08-181-0/+4
|
* gallium: init default texture image to grayBrian Paul2008-08-141-0/+3
|
* gallium: use a default texture in update_textures(), update_samplers() when ↵Brian Paul2008-08-141-0/+40
| | | | | | | needed The default texture is used when the current fragment shader has texture sample instructions but the user has not provided/bound a texture.