summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_texture.c
AgeCommit message (Collapse)Author
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
2008-09-26mesa: remove const qualifiers to match device driver interface functionBrian Paul
2008-09-18gallium: if we run out of memory in st_TexImage, flush and try again.Brian Paul
If the driver buffers a scene flushing should release old textures and make space for new ones. Fixes problem with texdown.c test.
2008-09-17gallium: need to finish, not flush, in st_copy_texsubimage()Brian Paul
2008-09-16gallium: fix glTexImage(width=height=depth=0) caseBrian Paul
Free old teximage/level data, then stop.
2008-09-01gallium: move st_texture_image() cast wrapper to header fileBrian Paul
2008-08-24gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.hBrian Paul
Also, rename p_tile.[ch] to u_tile.[ch]
2008-08-18gallium: fix do_flip bug on glCopyTexImage / surface_copy() pathBrian Paul
2008-08-14gallium: init default texture image to grayBrian Paul
2008-08-14gallium: use a default texture in update_textures(), update_samplers() when ↵Brian Paul
needed The default texture is used when the current fragment shader has texture sample instructions but the user has not provided/bound a texture.
2008-08-13gallium: in fallback_copy_texsubimage() create new tex surface for CPU read ↵Brian Paul
access Was trying to use the strb->surface but it's made for GPU read/write only.
2008-08-08gallium: fix additional glCopyTex[Sub]Image issuesBrian Paul
Use the TexFormat->StoreImage() routine for fallbacks. This handles the case of copying RGBA framebuffer data into an RGBA texture when the base format is GL_RGB (or GL_LUMINANCE, etc). In that case, we need to set the texture's alpha=1 and override the framebuffer's alpha.
2008-08-07gallium: clean-up, remove dead code, update commentsBrian Paul
2008-08-07gallium: fix a few bugs on the fallback CopyTex[Sub]Image() path.Brian Paul
2008-07-19gallium: Finer grained is_format_supported.José Fonseca
2008-07-15st: Silence compiler warnings on Windows.Michal Krol
2008-07-13util: Eliminate pipe from the arguments to pipe_get/put_tile_xxx functions.José Fonseca
You don't need a pipe_context * for this, and all other necessary info is already inside pipe_surface.
2008-06-27gallium: Drop pipe_texture->cpp and pipe_surface->cpp.José Fonseca
The chars-per-pixel concept falls apart with compressed and yuv images, where more than one pixel are coded in a single data block.
2008-06-23gallium: added support for fixed-point formats, drawingBrian Paul
2008-06-23gallium: fix-up inverted do_copy_texsubimage()Brian Paul
The logic/arithmetic for inverting the src image is a bit simpler now.
2008-06-23gallium: remove dead/prototype codeBrian Paul
2008-06-12gallium: add some #if FEATURE_x testsBrian Paul
2008-06-12gallium: test for FEATURE_convolutionBrian Paul
2008-05-18Merge branch 'gallium-0.1' into gallium-tex-surfacesBrian Paul
2008-05-16gallium: ref counting clean-upsBrian Paul
2008-05-09gallium: depth textures have usage depth_stencil instead of render_targetRoland Scheidegger
2008-05-08gallium: fix out of tex memory crashesBrian Paul
2008-05-07gallium: fix some render to texture bugsBrian Paul
Before, we were sometimes rendering into a stale texture because st_finalize_texture() would discard the old texture and create a new one. Moved st_update_framebuffer atom after texture validation so that we can create a new renderbuffer surface if the texture changes. Also, split texture validation into two parts: finalize_textures and update_textures. Do finalize_textures first to avoid getting into the situtation where we're doing a pipe->surface_copy() mid-way through state validation. Some debug code still in place, but disabled...
2008-05-07Revert "gallium: move setup of dest_surface in do_copy_texsubimage()"Michel Dänzer
This reverts commit f7dbd18371f9cb6686b6a97642b3ca5577e83472. Looks like an accidental revert of commit 650c57f19398800dfdcf357b6e9ec7b68bfa34f1.
2008-05-06gallium: re-enable temporarily disabled code in do_copy_texsubimage()Brian Paul
2008-05-06gallium: create drawing surfaces as GPU_READ/WRITE onlyBrian Paul
Create different temporary surfaces for CPU_READ/WRITE when needed (such as for glReadPixels, glAccum, some glCopy/DrawPixels, glCopyTexSubImage, etc).
2008-05-06gallium: move setup of dest_surface in do_copy_texsubimage()Michal Danzer