aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/savage/savagetex.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Remove EXT_convolution.Eric Anholt2010-09-231-3/+0
| | | | More optional code.
* savage: Add assert to check for null pointer dereference.Vinson Lee2010-02-271-0/+1
|
* Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg2010-02-191-2/+2
|
* Merge branch 'mesa_7_7_branch'Brian Paul2010-01-251-2/+0
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/drivers/dri/intel/intel_screen.c src/mesa/drivers/dri/intel/intel_swapbuffers.c src/mesa/drivers/dri/r300/r300_emit.c src/mesa/drivers/dri/r300/r300_ioctl.c src/mesa/drivers/dri/r300/r300_tex.c src/mesa/drivers/dri/r300/r300_texstate.c
| * savage: Remove unnecessary headers.Vinson Lee2010-01-231-2/+0
| |
* | mesa: make texture BorderColor a union of float/int/uintBrian Paul2010-01-041-2/+2
|/ | | | | | | | When we have integer-valued texture formats, the texture border color must also store integer and uint values. With GL 3.0, the new glTexParameterIiv() and glTexParameterIuiv() functions can set the border color to int or uint values.
* drivers: don't include texformat.hBrian Paul2009-10-051-14/+9
| | | | And remove other unneeded #includes while we're at it.
* mesa: replace gl_texture_format with gl_formatBrian Paul2009-09-301-47/+80
| | | | | | Now gl_texture_image::TexFormat is a simple MESA_FORMAT_x enum. ctx->Driver.ChooseTexture format also returns a MESA_FORMAT_x. gl_texture_format will go away next.
* dri: use BorderColor instead of _BorderChanBrian Paul2009-04-011-3/+3
|
* mesa: standardize on C99's uint*_t instead of u_int*_tKeith Whitwell2008-09-211-3/+3
|
* mesa: added "main/" prefix to includes, remove some -I paths from ↵Brian Paul2008-09-181-10/+9
| | | | Makefile.template
* replace __inline and __inline__ with INLINE macroBrian Paul2008-06-211-1/+1
|
* Replace open-coded major, minor, and patch version fields with __DRIversionRec.Kristian Høgsberg2007-10-101-2/+2
|
* shuffle some code to make some assertions in the _savage_texstore_a111xxxx ↵Roland Scheidegger2006-06-091-38/+45
| | | | functions compile without error...
* In gl_texture_image, replace ImageStride with an ImageOffsets array.Brian Paul2006-05-201-95/+53
| | | | | | | | | Some hardware lays out 3D mipmaps in a manner that can't be expressed with a simple image stride. The ImageOffsets array is allocated and initialized to typical defaults in the _mesa_init_teximage_fields() function. If needed, a driver will then have to replace these offsets. TexStore and TexelFetch routines updated to use offsets array.
* In gl_texture_image replace IntFormat with InternalFormat and Format withBrian Paul2005-10-051-3/+5
| | | | _BaseFormat to be consistant with gl_renderbuffer.
* Enable GL_ARB_texture_mirrored_repeat on Savage4. Refactor the code thatIan Romanick2005-09-221-68/+78
| | | | | | | sets the texture wrap mode and texture filter mode for Savage4 to the new functions savage4_set_wrap_mode and savage4_set_filter_mode. This was tested with texwrap and tunnel.
* Fixed and cleaned up programming of watermark registers. There may beFelix Kuehling2005-05-011-3/+0
| | | | | | a marginal speedup, but I'm not sure this has the same effect on all hardware. Tested on Savage IX and ProSavageDDR. For experimenting with different values see the macros at the start of savagestate.c.
* Added S3TC support to the Savage driver with some help from Mark Cass'sFelix Kuehling2005-04-301-30/+187
| | | | | | | S3TC support for an older driver version. On Savage3D/IX/MX GL_EXT_texture_compression_s3tc can't be enabled because DXT3 and DXT5 are not supported. However GL_S3_s3tc is enabled on all Savage chips. Tested on a Savage IX and a ProSavageDDR
* Texturing fixes for Savage3D/MX/IX:Felix Kuehling2005-04-231-18/+218
| | | | | | | | | | | | | | | | | - force emitting texAddr when the texture image changed (flush caches) - set transparent texture color key to something improbable (couldn't find a way to disable it completely) - fixed texture environment modes GL_DECAL and GL_REPLACE - made texture environment mode GL_BLEND a software fallback - added two custom texture formats for promoting from GL_ALPHA to ARGB8888 and 4444. Since the hardware can't be made to ignore the RGB color components, set them to 1 instead of 0. This gives the correct results - disabled GL_EXT_texture_env_add on Savage3D/MX/IX - map both GL_CLAMP and GL_CLAMP_TO_EDGE to hardware mode "wrap". It doesn't match either mode exactly by the spec, so we should either fall back on both or none. I chose the latter. - fall back to software when s and t wrapping modes differ (hardware has only one bit for both)
* Fixed some suspicious pointer casts that caused lots ofFelix Kuehling2005-04-211-1/+1
| | | | | | compile-time-warnings on x86-64. Not tested on x86-64 yet, but a good thing in general, so I'm giving up waiting for feedback. See also https://bugs.freedesktop.org/show_bug.cgi?id=2924.
* Fixed TexEnv modes GL_BLEND and GL_ADD on Savage4-based cards. DisabledFelix Kuehling2005-04-211-24/+68
| | | | | the use of hardware texture format I8 as it produces garbage at least on ProSavageDDR.
* When timestamping textures, need to emit the event with SAVAGE_WAIT_3DFelix Kuehling2005-03-141-15/+41
| | | | | | | | set. Otherwise the 3D engine may still be using a texture that is being overwritten. In order to minimize the cost of waiting, timestamp textures only when needed: when a texture image changes, when a different texture is bound to a texture unit or when a texture unit is disabled. (Used to be after flushing every command buffer.)
* - Flush before updating the timestamp of a texture heap from a bound texture.Felix Kuehling2005-03-101-3/+21
| | | | | | | - Flush before using a new texture or before disabling a texture unit, because savageFlushCmdBuf can only update the timestamp of the last used texture. This fixes corruption in quake2 with single-textured lighting.
* Don't forget to update a heap's timestamp when a texture image isFelix Kuehling2005-02-231-2/+15
| | | | | | changed. Other drivers don't need to do this because they're swapping modified textures out of texture memory, which implies a timestamp update.
* With Savage DRM version 2.3.x or later use event counters for textureFelix Kuehling2005-02-231-1/+8
| | | | | heap aging, similar to the way it's done in the i810 and i855 drivers. This avoids idling the engine on every texture upload.
* Offset LOD bias by about 0.3 to match software rendering more closely.Felix Kuehling2005-02-121-18/+18
| | | | Another small tweak to subtile upload (mostly cosmetic).
* Savage3D-based chips seem so use a constant tile stride of 2048 forFelix Kuehling2005-02-121-1/+10
| | | | | vertically incomplete tiles, but only if the color depth is 32bpp. Nobody said this was supposed to be logical!
* Fixed stride of incomplete tiles.Felix Kuehling2005-02-091-1/+1
|
* Made subtile upload a template. This speeds up tiled texture uploads byFelix Kuehling2005-02-041-6/+41
| | | | about a factor 1.3.
* Fixed some debug output that was unconditionally enabled.Felix Kuehling2005-02-021-5/+6
|
* * Fixed uploading of textures of certain sizes.Felix Kuehling2005-01-291-23/+163
| | | | | | | | * When glTexSubImageND is used, track the set of changed tiles in a bit vector and upload only dirty tiles later. This should improve the performance of dynamic light maps and gl movie player plugins. * Renamed debug item "lru" to "tex". Indicate which levels are uploaded completely or partially.
* Converted the Savage texture management to use Ian's common texmem code.Felix Kuehling2005-01-241-371/+145
|
* Small cleanup:Felix Kuehling2005-01-211-1/+1
| | | | | | | * Remove some unused (mostly empty) functions * Added context parameter to WAIT_IDLE_EMPTY[_LOCKED] for consistency * Added debug messages to WAIT_IDLE_EMPTY[_LOCKED] * Don't flush empty command buffers
* Fixes to cope with the lack of AGP textures. This is all that's neededFelix Kuehling2005-01-101-1/+1
| | | | to support PCI Savages on the Mesa side. Bumped driver date.
* * Fixed handling of scissorsFelix Kuehling2005-01-051-4/+0
| | | | | | | * Only set scissor regs directly if drmMinor < 1 * Don't set texaddr to 0 when a texture unit is disabled. That would trigger the tightened texture state check in the DRM if the texaddr and texdesc registers were not emitted atomically.
* Removed all direct hardware access (MMIO, BCI) from the Savage DRIFelix Kuehling2005-01-011-9/+10
| | | | | driver. It uses the new DRM version 2.0.x now, which has just been committed to DRM CVS.
* Enabled hardware rendering of 1D textures. No need for a software fallback.Felix Kuehling2004-12-221-12/+69
|
* Made debugging output controllable via environment variableFelix Kuehling2004-12-171-9/+5
| | | | | SAVAGE_DEBUG. Added fallback debugs. Added no_rast option to disable hardware rasterization (everything as software fallback).
* Added configuration support to the Savage driver. Three options areFelix Kuehling2004-12-151-2/+6
| | | | supported so far.
* Fixed GL_CLAM_TO_EDGE. It's not supported in hardware. Use GL_CLAMPFelix Kuehling2004-12-151-4/+8
| | | | instead of GL_REPEAT.
* uint*t -> u_int*tAlan Hourihane2004-12-141-3/+3
|
* More state management changes:Felix Kuehling2004-03-251-0/+2
| | | | | | | - Don't lock in savageDDUpdateStatte, don't call savageEmitHwStateLocked - Need to grab the lock for texture uploads now - New SAVAGE_NEW_CULL bit in new_state to make sure that culling state and raster_primitive are not examined at the wrong times.
* Buffer vertices and emit them in batches. Still using conventional drawingFelix Kuehling2004-03-241-2/+2
| | | | commands, no vertex DMA.
* unsigned int -> uint32_t, unsigned char -> uint8_t where the size matters.Felix Kuehling2004-03-211-10/+5
| | | | | A bit more cosmetics. Improved state emit on Savage 3D/IX/MX.
* Fixed texture LOD bias.Felix Kuehling2004-03-201-63/+24
|
* Fixed MAXFIFO_S4. Removed WAIT_IDLE_EMPTY from savage_BCI_swap which resultedFelix Kuehling2004-03-201-0/+2
| | | | | | in another small speedup. Fixed a problem that was masked by that WAIT_IDLE_EMPTY: - flush command buffer and WAIT_IDLE_EMPTY before uploading textures
* Cleaned up and slightly optimized the texture upload code.Felix Kuehling2004-03-081-145/+122
|
* Swapout textures who's space is claimed by a new texture. Don't destroy.Felix Kuehling2004-03-081-1/+1
| | | | | This finally really fixes assertion failures in savageBindTexture. I think the same situation with several contexts is still broken though.
* Fixed texture tiling format for 8bit texels on ProSavage and Twister.Felix Kuehling2004-03-071-5/+5
|