aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_format.h
Commit message (Collapse)AuthorAgeFilesLines
* 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