summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/savage/savagetex.c
AgeCommit message (Collapse)Author
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
2010-09-23mesa: Remove EXT_convolution.Eric Anholt
More optional code.
2010-02-27savage: Add assert to check for null pointer dereference.Vinson Lee
2010-02-19Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg
2010-01-25Merge branch 'mesa_7_7_branch'Brian Paul
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
2010-01-23savage: Remove unnecessary headers.Vinson Lee
2010-01-04mesa: make texture BorderColor a union of float/int/uintBrian Paul
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.
2009-10-05drivers: don't include texformat.hBrian Paul
And remove other unneeded #includes while we're at it.
2009-09-30mesa: replace gl_texture_format with gl_formatBrian Paul
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.
2009-04-01dri: use BorderColor instead of _BorderChanBrian Paul
2008-09-21mesa: standardize on C99's uint*_t instead of u_int*_tKeith Whitwell
2008-09-18mesa: added "main/" prefix to includes, remove some -I paths from ↵Brian Paul
Makefile.template
2008-06-21replace __inline and __inline__ with INLINE macroBrian Paul
2007-10-10Replace open-coded major, minor, and patch version fields with __DRIversionRec.Kristian Høgsberg
2006-06-09shuffle some code to make some assertions in the _savage_texstore_a111xxxx ↵Roland Scheidegger
functions compile without error...
2006-05-20In gl_texture_image, replace ImageStride with an ImageOffsets array.Brian Paul
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.
2005-10-05In gl_texture_image replace IntFormat with InternalFormat and Format withBrian Paul
_BaseFormat to be consistant with gl_renderbuffer.
2005-09-22Enable GL_ARB_texture_mirrored_repeat on Savage4. Refactor the code thatIan Romanick
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.
2005-05-01Fixed and cleaned up programming of watermark registers. There may beFelix Kuehling
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.
2005-04-30Added S3TC support to the Savage driver with some help from Mark Cass'sFelix Kuehling
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
2005-04-23Texturing fixes for Savage3D/MX/IX:Felix Kuehling
- 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)
2005-04-21Fixed some suspicious pointer casts that caused lots ofFelix Kuehling
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.
2005-04-21Fixed TexEnv modes GL_BLEND and GL_ADD on Savage4-based cards. DisabledFelix Kuehling
the use of hardware texture format I8 as it produces garbage at least on ProSavageDDR.
2005-03-14When timestamping textures, need to emit the event with SAVAGE_WAIT_3DFelix Kuehling
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.)
2005-03-10- Flush before updating the timestamp of a texture heap from a bound texture.Felix Kuehling
- 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.
2005-02-23Don't forget to update a heap's timestamp when a texture image isFelix Kuehling
changed. Other drivers don't need to do this because they're swapping modified textures out of texture memory, which implies a timestamp update.
2005-02-23With Savage DRM version 2.3.x or later use event counters for textureFelix Kuehling
heap aging, similar to the way it's done in the i810 and i855 drivers. This avoids idling the engine on every texture upload.
2005-02-12Offset LOD bias by about 0.3 to match software rendering more closely.Felix Kuehling
Another small tweak to subtile upload (mostly cosmetic).
2005-02-12Savage3D-based chips seem so use a constant tile stride of 2048 forFelix Kuehling
vertically incomplete tiles, but only if the color depth is 32bpp. Nobody said this was supposed to be logical!
2005-02-09Fixed stride of incomplete tiles.Felix Kuehling
2005-02-04Made subtile upload a template. This speeds up tiled texture uploads byFelix Kuehling
about a factor 1.3.
2005-02-02Fixed some debug output that was unconditionally enabled.Felix Kuehling
2005-01-29* Fixed uploading of textures of certain sizes.Felix Kuehling
* 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.
2005-01-24Converted the Savage texture management to use Ian's common texmem code.Felix Kuehling
2005-01-21Small cleanup:Felix Kuehling
* 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
2005-01-10Fixes to cope with the lack of AGP textures. This is all that's neededFelix Kuehling
to support PCI Savages on the Mesa side. Bumped driver date.
2005-01-05* Fixed handling of scissorsFelix Kuehling
* 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.
2005-01-01Removed all direct hardware access (MMIO, BCI) from the Savage DRIFelix Kuehling
driver. It uses the new DRM version 2.0.x now, which has just been committed to DRM CVS.
2004-12-22Enabled hardware rendering of 1D textures. No need for a software fallback.Felix Kuehling
2004-12-17Made debugging output controllable via environment variableFelix Kuehling
SAVAGE_DEBUG. Added fallback debugs. Added no_rast option to disable hardware rasterization (everything as software fallback).
2004-12-15Added configuration support to the Savage driver. Three options areFelix Kuehling
supported so far.
2004-12-15Fixed GL_CLAM_TO_EDGE. It's not supported in hardware. Use GL_CLAMPFelix Kuehling
instead of GL_REPEAT.
2004-12-14uint*t -> u_int*tAlan Hourihane
2004-03-25More state management changes:Felix Kuehling
- 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.
2004-03-24Buffer vertices and emit them in batches. Still using conventional drawingFelix Kuehling
commands, no vertex DMA.
2004-03-21unsigned int -> uint32_t, unsigned char -> uint8_t where the size matters.Felix Kuehling
A bit more cosmetics. Improved state emit on Savage 3D/IX/MX.
2004-03-20Fixed texture LOD bias.Felix Kuehling
2004-03-20Fixed MAXFIFO_S4. Removed WAIT_IDLE_EMPTY from savage_BCI_swap which resultedFelix Kuehling
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
2004-03-08Cleaned up and slightly optimized the texture upload code.Felix Kuehling
2004-03-08Swapout textures who's space is claimed by a new texture. Don't destroy.Felix Kuehling
This finally really fixes assertion failures in savageBindTexture. I think the same situation with several contexts is still broken though.