aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_format.h
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: add st_context parameter to st_mesa_format_to_pipe_formatMarek Olšák2014-08-111-2/+2
| | | | | | This will be used by the next commit. Reviewed-by: Glenn Kennard <[email protected]>
* mesa: change gl_format to mesa_formatMark Mueller2014-01-271-3/+3
| | | | s/\bgl_format\b/mesa_format/g. Use better name for Mesa Formats enum
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <[email protected]>
* st/mesa: add const qualifier to st_translate_color()Brian Paul2013-12-131-1/+1
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* st/mesa: handle texture_from_pixmap and other surface-based textures correctlyMarek Olšák2013-05-151-4/+0
| | | | | | | | | | | | | | | | | | | | | There were 2 issues with it: 1) The texture format which should be used for texturing was only set in gl_texture_image::TexFormat, which wasn't used for sampler views. 2) Textures are sometimes reallocated under some circumstances in st_finalize_texture, which is unacceptable if the texture comes from a window system. The issues are resolved as follows: 1) If surface_based is true (texture_from_pixmap, etc.), store the format in a new variable st_texture_object::surface_format. 2) Don't reallocate a surface-based texture in st_finalize_texture. Also don't use st_ChooseTextureFormat is st_context_teximage, because the format is dictated by the caller. This fixes the glx-tfp piglit test. Reviewed-by: Adam Jackson <[email protected]>
* mesa: allow internalformat_query with multisample texture targetsChris Forbes2013-03-241-2/+2
| | | | | | | | | | | | | | | | Now that we support ARB_texture_multisample, there are multiple targets accepted for this query, and they may have target-dependent limits, so pass the target to the driverfunc. For example, the sampling hardware may not be able to do general texelFetch() for some format/sample count combination, but the driver may still be able to implement a reasonable resolve operation, so it can be supported for renderbuffers. V2: - Don't break Gallium compile. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: try to find exact format matching user format and type for DrawPixelsMarek Olšák2013-02-141-0/+3
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: get rid of GET_CURRENT_CONTEXT in st_choose_formatMarek Olšák2013-02-061-2/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: merge st_ChooseTextureFormat_renderable() into st_ChooseTextureFormat()Brian Paul2013-02-041-4/+0
| | | | That was the only place it was being called from.
* st/mesa: don't choose DXT formats if we can't do DXT compressionBrian Paul2013-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | If we call gl[Copy]TexImage2D() with a generic compression format (e.g. intFormat=GL_COMPRESSED_RGBA) we can't choose a DXT format if we don't have the external DXT compression library. We weren't actually enforcing this before since the pipe_screen::is_format_supported(DXT) query has no dependency on the DXT compression library. Now if we're given a generic compressed format and we can't do DXT compression we'll fall back to a non-compressed format. v2: use util_format_is_s3tc() function and add more comments about the allow_dxt parameter. Note: This is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: implement ARB_internalformat_query v2Marek Olšák2013-01-241-0/+3
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix integer texture border color for some formats (v2)Marek Olšák2012-10-151-2/+3
| | | | | | | | | | | | And the clear color too, though that may be an issue only with GL_RGB if it's actually RGBA in the driver. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> v2: The types of st_translate_color parameters were changed to gl_color_union and pipe_color_union as per Brian's comment.
* 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]>
* st/mesa: remove unused st_equal_formats() functionBrian Paul2012-02-151-3/+0
| | | | | | It was incomplete and didn't take byte swapping into account either. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: remove gl_renderbuffer:DataType assignmentsBrian Paul2012-01-241-3/+0
| | | | | | | | That field is only used by swrast code so there's no reason to mess with it in the gallium state tracker. This also lets us remove the unused st_format_data() type function and related code.
* mesa: introduce a clear color union to be used for int/unsigned buffersDave Airlie2011-09-141-1/+0
| | | | | | | | | | This introduces a new gl_color_union union and moves the current ClearColorUnclamped to use it, it removes current ClearColor completely and renames CCU to CC, then all drivers are modified to expected unclamped floats instead. also fixes st to use translated color in one place it wasn't. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: s/tex_usage/bindings/ in st_format.hBrian Paul2011-06-291-1/+1
| | | | Just be consistent with the .c file.
* st/mesa: prefer native texture formats when possible.Stéphane Marchesin2011-06-221-0/+1
| | | | | | If possible, we want to match the hardware format to what the app uses. By doing so, we avoid the need for pixel conversions and therefore greatly speed up texture uploads.
* st/mesa: need to translate clear color according to surface's base formatBrian Paul2011-02-211-0/+6
| | | | | | | | | | | When clearing a GL_LUMINANCE_ALPHA buffer, for example, we need to convert the clear color (R,G,B,A) to (R,R,R,A). We were doing this for texture border colors but not renderbuffers. Move the translation function to st_format.c and share it. This fixes the piglit fbo-clear-formats test. NOTE: This is a candidate for the 7.9 and 7.10 branches.
* st/mesa: Clean up header file inclusion in st_format.h.Vinson Lee2010-12-211-1/+2
|
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-2/+2
|
* st/mesa: add option to choose a texture format that we won't render to.Dave Airlie2010-10-131-0/+4
| | | | | | | We need a texture to put the drawpixels stuff into, an S8 texture is less memory/bandwidth than the 32-bit X24S8, but we might not be able to render directly to an S8, so this lets us specify we won't be rendering to this texture.
* st/mesa: Include missing headers in st_format.h.Vinson Lee2010-08-051-0/+5
|
* st/mesa: attempt to fix TFP by using sampler views (v1)Dave Airlie2010-06-081-0/+4
| | | | | | | | | Okay I think this is good enough for now, I can't see any other reason for mesa to want to use a sampler view so lets just leave it at all the A->X conversions for now. I've been running gnome-shell under r300g with this for day or so and it seems fine. Signed-off-by: Dave Airlie <[email protected]>
* mesa/st: adapt to interface changesRoland Scheidegger2010-05-171-2/+3
| | | | | adapt to blit changes, and also handle a bit more msaa state in theory (incomplete, doesn't handle resolves in any way for now).
* st/mesa: updated commentsBrian Paul2010-02-241-1/+2
|
* st/mesa: more format code clean-up and removalBrian Paul2010-02-241-15/+0
|
* st/mesa: clean-up of format-related codeBrian Paul2010-02-241-15/+6
|
* Merge branch 'texformat-rework'Brian Paul2009-10-281-3/+7
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/drivers/dri/radeon/radeon_fbo.c src/mesa/drivers/dri/s3v/s3v_tex.c src/mesa/drivers/dri/s3v/s3v_xmesa.c src/mesa/drivers/dri/trident/trident_context.c src/mesa/main/debug.c src/mesa/main/mipmap.c src/mesa/main/texformat.c src/mesa/main/texgetimage.c
| * mesa: remove a bunch of gl_renderbuffer fieldsBrian Paul2009-10-081-2/+5
| | | | | | | | | | | | _ActualFormat is replaced by Format (MESA_FORMAT_x). ColorEncoding, ComponentType, RedBits, GreenBits, BlueBits, etc. are all replaced by MESA_FORMAT_x queries.
| * mesa: replace gl_texture_format with gl_formatBrian Paul2009-09-301-1/+2
| | | | | | | | | | | | 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.
* | st/mesa: pass pipe_screen, not pipe_context to st_choose_format() functionsBrian Paul2009-10-071-2/+3
|/ | | | These don't depend on context state, but use a screen pointer.
* mesa: Use PIPE_TEXTURE_USAGE_DEPTH_STENCIL for any depth or stencil format.José Fonseca2009-06-111-2/+2
|
* st: st_equal_formats() function to compare gallium/GL pixel formatsBrian Paul2009-04-151-0/+4
|
* gallium: Finer grained is_format_supported.José Fonseca2008-07-191-1/+1
|
* gallium: make choose_format() non-static: st_choose_format()Brian Paul2008-04-161-0/+4
|
* Re-org of st_create_framebuffer() and renderbuffer format selection.Brian2007-12-121-3/+2
| | | | | | | | st_create_framebuffer() now takes pipe_formats for the color, depth, stencil buffers. This avoids a round-about chain of calls to pipe->is_format_supported() for window renderbuffers (their format never changes). Renderbuffer format selection code in st_format.c is simpler now too.
* Add 'type' parameter to is_format_supported() to specify texture vs. drawing ↵Brian2007-12-101-1/+1
| | | | | | surface, etc. Additional types may be added in the future.
* Define PIPE_FORMAT_ tokens as an enum set, rather than #defines.Brian2007-12-071-10/+8
| | | | | This makes debugging a _lot_ easier. In gdb, "print format" used to display 613570600, now you see PIPE_FORMAT_A8R8G8B8_UNORM.
* Use PIPE_FORMAT in state tracker.michal2007-10-271-2/+4
| | | | | Fix PIPE_FORMAT field encoding. Re-implement st_get_format_info.
* 16-bit rgba surface/format for accumBrian2007-10-141-0/+5
|
* added st_sizeof_format()Brian2007-08-101-0/+4
|
* added st_mesa_format_to_pipe_format()Brian2007-08-101-0/+4
|
* Rename (file contains surface format-related functions)Brian2007-08-101-0/+63