summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_texture.c
AgeCommit message (Collapse)Author
2009-08-05mesa/st: Add support for binding pipe surface to texture.Chia-I Wu
This commit adds functions to bind a pipe surface to a texture. This allows texturing directly from the surface. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-01mesa st: Move logbase2 function to util/u_math.hPatrice Mandin
2009-07-27st/mesa: silence warningBrian Paul
2009-07-16mesa: Fix logbase2.José Fonseca
It was providing 1 too many for non power two values.
2009-07-14mesa: Report the true face number when flushing.José Fonseca
2009-07-07gallium: Fixes for clobbering stencil values in combined depth/stencil textures.Michel Dänzer
Also fix one case where a 32 bit depth value was incorrectly converted to a combined depth/stencil value.
2009-07-02mesa: Assume depth textures have a single level unless told otherwise.José Fonseca
2009-06-30st/gl: Add stubs for CompressedTexSubImage[1D|3D]Jakob Bornecrantz
2009-06-30st/gl: Add support for glCompressedTexSubImageJakob Bornecrantz
2009-06-01mesa/st: restore flush to copy_texsubimage (was previously finish)Keith Whitwell
Need a flush here even though the original finish was overkill.
2009-06-01st/gl: Fix mip gen for compressed texturesJakob Bornecrantz
2009-05-08mesa/st: keep surface_copy arguments positiveKeith Whitwell
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.
2009-05-08mesa/st: remove redundant call to st_finish in CopyTexSubImageKeith Whitwell
Rendering should already have been flushed, any synchronization will be done by the driver or memory manager.
2009-04-28mesa/st: workaround for crashes in st_copy_texsubimageKeith Whitwell
Proper fix for this hasn't been identified, but avoid crashing.
2009-04-27mesa/st: fix incorrect face, level in compress_with_blitKeith Whitwell
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.
2009-04-20mesa: Handle failure to create a transfer.José Fonseca
2009-04-17gallium: Create OGL state tracker wrappers for various CPU access operations.Thomas Hellstrom
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>
2009-04-16Merge branch 'gallium-s3tc'José Fonseca
2009-04-15st: remove XXX commentBrian Paul
2009-04-15st: check for fast memcpy path in decompress_with_blit()Brian Paul
2009-04-15st: decompress_with_blit() path for glGetTexImage().Brian Paul
Decompress a texture by rendering a textured quad.
2009-04-15gallium: Make sure we flush before some texture / buffer operations.Thomas Hellstrom
Also implement context member functions to optimize away those flushes whenever possible. Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-14mesa: Fix gcc assembly enable logic.José Fonseca
The i386 symbol is defined on WINDDK.
2009-04-09st: remove another unneeded 'is compressed' comparisonBrian Paul
2009-04-09st: remove comp_byte parameter to st_texture_create()Brian Paul
We can determine if the texture is compressed by checking the format.
2009-04-09st: consolidate format->usage computationBrian Paul
2009-04-09st: add const qualifiers, use GL typesBrian Paul
2009-04-09st: make loops over 3D texture slices a litte more intuitiveBrian Paul
2009-04-09st: reformatting and clean-ups in texture codeBrian Paul
2009-04-09st: If the hw supports it do hw conversion of texture uploadsJakob Bornecrantz
2009-04-07st: implement glCopyTexImage() for GL_DEPTH24_STENCIL8 internal formatBrian Paul
2009-04-03mesa: move glGetTexImage(), glGetCompresssedTexImage() code into new fileBrian Paul
2009-03-26st: init the default texture to (0,0,0,1)Brian Paul
The default texture is used when a sampler uses an incomplete texture. This change fixes the piglit fp-incomplete test.
2009-03-21st: Silence compiler warnings.Michal Krol
2009-03-19st/gl: Only transfer needed parts in st_TexSubimageJakob Bornecrantz
2009-03-18st: need to free/realloc pipe texture when we're handed image level > last_levelBrian Paul
Fixes progs/tests/tri-fbo-tex-mip.c
2009-03-18st: clean up some if-statment codeBrian Paul
2009-03-13gallium: Remove do_flip argument from surface_copyJakob Bornecrantz
I should have gotten most uses and implementation correctly fixed, but things might break. Feel free to blame me.
2009-03-07gallium: use unsigned long to silence warnings with 64-bit buildBrian Paul
2009-03-04gallium: Unify reference counting.Michel Dänzer
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().
2009-02-22mesa: move a bunch of compiler-related stuff into new compiler.h headerBrian Paul
This trims down and cleans up imports.h and glheader.h quite a bit.
2009-02-16Merge branch 'master' into gallium-texture-transferKeith Whitwell
Conflicts: src/mesa/state_tracker/st_cb_accum.c src/mesa/state_tracker/st_cb_drawpixels.c
2009-02-13gallium: Various coordinate fixups for texture transfers.Michel Dänzer
Fixes glReadPixels, gl(Copy)TexSubImage, glCopyPixels.
2009-02-12mesa: use new ST_CALLOC_STRUCT() macro in gallium state trackerBrian Paul
2009-02-10mesa: Compare formats using nominal bytes per pixel.José Fonseca
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.
2009-02-05gallium: No longer allow CPU mapping surfaces directly.Michel Dänzer
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.
2008-10-17Merge commit 'origin/gallium-0.1' into gallium-0.2Brian Paul
Conflicts: progs/trivial/tri.c
2008-10-17gallium: fix mis-matched malloc/free vs. aligned malloc/freeBrian Paul
Use aligned malloc/free for teximage data everywhere to be consistant. The mismatch didn't make any difference when HAVE_POSIX_MEMALIGN was defined.
2008-10-10Merge commit 'origin/gallium-0.1' into gallium-0.2Keith Whitwell
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
2008-10-06mesa: fix convolve/convolution mix-upsBrian