aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau/nouveau_texture.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Introduce a globally-available minify() macro.Eric Anholt2013-04-211-2/+2
| | | | | | This matches u_minify()'s behavior, for consistency. Reviewed-by: Brian Paul <[email protected]>
* mesa: Fix error reporting in _mesa_invalidate_pbo_{compressed_,}teximage.Paul Berry2013-01-021-2/+2
| | | | | | | | | | | The old error reporting was completely bogus, passing _mesa_error() a format string that didn't even match the remaining arguments. Also, in many cases the number of dimensions in the TexImage call was not preserved in the error message (e.g. an error in glTexImage2D was reported simply as an error in glTexImage). Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa: add MaxNumLevels to gl_texture_image, remove MaxLog2Marek Olšák2012-11-121-1/+1
| | | | | | | | | | | MaxLog2 led to bugs, because it didn't work well with 1D and 3D textures. NOTE: This is a candidate for the stable branches. v2: correct the comment at MaxNumlevels Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* mesa: add texture target field to ChooseTextureFormat() driver hookBrian Paul2012-08-241-1/+2
| | | | | | | | | This will let us choose the actual hardware format depending on the type of texture. v2: fixup radeon, nouveau, intel and swrast drivers too Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove unnecessary parameters CompressedTexImagePauli Nieminen2012-08-121-2/+0
| | | | | | | | | In tune with previous patches. Again there is duplication of information in function parameters that is good to remove. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove unnecessary parameters from TexImagePauli Nieminen2012-08-121-13/+8
| | | | | | | | | | | gl_texture_image structure always holds size and internal format before TexImage driver hook is called. Those passing same information in function parameters only duplicates information making the interface harder to understand. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glCompressedTexSubImage1/2/3D codeBrian Paul2012-06-061-6/+6
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glCompressedTexImage1/2/3D codeBrian Paul2012-06-061-3/+3
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glTexSubImage1/2/3D codeBrian Paul2012-06-061-35/+8
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glTexImage1/2/3D codeBrian Paul2012-06-061-35/+8
| | | | | | | The functions for handling 1D, 2D and 3D texture images were nearly identical. This folds them all together. Reviewed-by: Kenneth Graunke <[email protected]>
* dri/nouveau: Add general support for compressed formats.Viktor Novotný2012-05-021-31/+104
| | | | | Signed-off-by: Viktor Novotný <[email protected]> Signed-off-by: Francisco Jerez <[email protected]>
* nouveau/vieux: switch to libdrm_nouveau-2.0Ben Skeggs2012-04-141-11/+8
|
* nouveau: stop calling ctx->Driver.Map/UnmapTexture()Brian Paul2012-01-241-27/+0
| | | | And remove unused nouveau_texture_map/unmap()
* swrast: s/Data/Map/ in swrast_texture_imageBrian Paul2012-01-241-7/+7
| | | | To indicate that it points to mapped texture memory.
* mesa: remove unused _mesa_init_teximage_fields() target parameterBrian Paul2012-01-041-1/+1
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* mesa: remove the dstX/Y/Zoffset params to _mesa_texstore() functionsBrian Paul2012-01-021-2/+2
| | | | | | | | The were always zero. When doing a sub-texture replacement we account for the dstX/Y/Zoffsets when we map the texture image. So no need to pass them into the texstore code anymore. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: simplify Driver.TexImage() parametersBrian Paul2011-12-301-22/+20
| | | | | | | | As with TexSubImage(), the target, level and texObj values can be obtained through the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: simplify Driver.TexSubImage() parametersBrian Paul2011-12-301-24/+21
| | | | | | | | There's no need to pass the target, level and texObj parameters since they can be easily obtained from the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* dri: Remove driver GenerateMipmap hooks.Eric Anholt2011-10-281-12/+0
| | | | | Mesa sets up _mesa_meta_GenerateMipmap as the default hook, which does this check for fallback and call the fallback itself.
* mesa: move gl_texture_image::Data, RowStride, ImageOffsets to swrastBrian Paul2011-10-231-10/+14
| | | | | | Only swrast and the drivers that fall back to swrast need these fields now. This removes the last of the fields related to software rendering from gl_texture_image.
* mesa: get rid of imageOffsets arrays in texstore codeBrian Paul2011-10-051-4/+5
| | | | | | | | | | | These were used to find the start of a 3D image slice (or 2D array texture slice) given a base address. Instead, use a simple array of address of image slices instead. This is a step toward getting rid of the gl_texture_image::ImageOffsets field. Reviewed-by: Eric Anholt <[email protected]>
* nouveau: remove unused code, unused varBrian Paul2011-10-031-29/+0
|
* mesa: Convert _mesa_generate_mipmap to MapTexImage()-based access.Brian Paul2011-10-031-10/+0
| | | | | | | | | | | Now that we can zero-copy generate the mipmaps into brand new glTexImage()-generated storage using MapTextureImage(), we no longer need to allocate image->Data in mipmap generate. This requires deleting the drivers' old overrides of the miptree tracking after calling _mesa_generate_mipmap at the same time, or the drivers promptly lose our newly-generated data. Reviewed-by: Eric Anholt <[email protected]>
* nouveau: Drop mapping we were doing around glGetTexImage().Eric Anholt2011-09-271-14/+0
| | | | It's handled by MapTextureImage() now.
* mesa: move software texel fetch code into swrastBrian Paul2011-09-171-1/+1
| | | | It's only used by swrast now so move it out of core Mesa.
* dri: Remove MESA_FORMAT_CI8 bits from drivers that don't do paletted texturesIan Romanick2011-08-291-9/+0
| | | | | | | This came from the "kill it with fire" discussion at XDS 2010. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nouveau: Add MapTextureImage() implementation.Eric Anholt2011-08-291-0/+81
| | | | | | | This is untested, but should be close to working since it's basically a copy of nouveau_teximage_map(). Reviewed-by: Brian Paul <[email protected]>
* mesa: Rename FreeTexImageData to FreeTextureImageBuffer.Eric Anholt2011-08-291-1/+1
| | | | | | | | This was produced by sed, except for one hunk in driverfuncs.c where trailing whitespace was dropped. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Switch generate_mipmaps_compressed() to using TexImage2D to upload.Eric Anholt2011-06-141-2/+4
| | | | | | | | | | | | | The code was playing fast and loose with rowstrides, which meant that if a driver chose anything different for its alignment requirements, the generated mipmaps came out garbage. Unlike the uncompressed case, we can't generate mipmaps directly into image->Data, so by using TexImage2D we cut out most of the weird logic that existed to generate in-place into ->Data. The up/downside is that the driver recovery code for the fact that _mesa_generate_mipmaps whacked ->Data has to be turned off for compressed now. Fixes 6 piglit tests about compressed mipmap gen.
* mesa: move sampler state into new gl_sampler_object typeBrian Paul2011-04-101-2/+2
| | | | | | gl_texture_object contains an instance of this type for the regular texture object sampling state. glGenSamplers() generates new instances of gl_sampler_object which can override that state with glBindSampler().
* nouveau: Fix serious compiler warningsJohannes Obermayr2011-03-181-0/+1
| | | | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=35025 Signed-off-by: Brian Paul <[email protected]>
* dri/nouveau: allow multiple maps of surface buffersBen Skeggs2011-01-191-2/+4
| | | | | | | | | Can happen during swrast fallbacks if a buffer is somehow bound as a render target and a texture. Fixes gnome-shell on nv20, and gets it mostly working on nv10. Signed-off-by: Ben Skeggs <[email protected]>
* mesa: pass gl_format to _mesa_init_teximage_fields()Brian Paul2010-11-181-2/+3
| | | | | | | | | | | This should prevent the field going unset in the future. See bug http://bugs.freedesktop.org/show_bug.cgi?id=31544 for background. Also remove unneeded calls to clear_teximage_fields(). Finally, call _mesa_set_fetch_functions() from the _mesa_init_teximage_fields() function so callers have one less thing to worry about.
* dri/nouveau: Pipeline glTexSubImage texture transfers.Francisco Jerez2010-10-311-19/+64
|
* dri/nouveau: Don't assert(0) on compressed internal formats.Francisco Jerez2010-10-301-0/+5
|
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-26/+26
|
* dri/nouveau: Fix software mipmap generation on 1x1 textures.Francisco Jerez2010-09-211-1/+1
|
* dri/nv10-nv20: Fix texturing in some cases after a base level change.Francisco Jerez2010-09-211-9/+8
|
* dri/nv04: Mipmapping fixes.Francisco Jerez2010-09-161-11/+17
|
* dri/nouveau: Don't try to validate uninitialized teximages.Francisco Jerez2010-08-051-4/+4
|
* dri/nouveau: Fix up software mipmap generation.Francisco Jerez2010-08-051-0/+49
|
* dri/nouveau: Rectangle texture fixes.Francisco Jerez2010-03-221-28/+45
|
* dri/nouveau: Flush after texture validation.Francisco Jerez2010-03-181-0/+2
| | | | | | | Swizzling needs the destination surface in VRAM, but the subsequent rendering operations making use of it are likely to not care. Fire the ring after validation to leave the memory manager more room for maneuvering.
* dri/nouveau: only reallocate texture when neededXavier Chantry2010-03-181-11/+14
| | | | | | | | | | | nouveau reallocated the mipmap tree on every MIN_FILTER call to account for mipmap change. We only need to do this if the texture does not fit in the existing mipmap tree. This gives a big performance boost for a game like bzflag which changes MIN_FILTER all the time for its font rendering. Signed-off-by: Xavier Chantry <[email protected]> Signed-off-by: Francisco Jerez <[email protected]>
* dri/nouveau: Use the XRGB8888 hardware texture format.Francisco Jerez2010-02-251-21/+24
|
* dri/nouveau: Use the hardware I8 format for intensity textures.Francisco Jerez2010-02-251-1/+1
|
* dri/nouveau: Implement EXT_texture_from_pixmap.Francisco Jerez2010-02-251-0/+53
|
* dri/nouveau: Support rectangle textures.Francisco Jerez2010-02-251-10/+11
|
* dri/nouveau: Don't try to map a non-existent teximage.Francisco Jerez2010-02-251-4/+7
|
* dri/nouveau: Try to validate textures earlier.Francisco Jerez2010-02-251-106/+178
|