summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_format.h
AgeCommit message (Collapse)Author
2011-01-22gallium/util: added util_format_linear()Brian Paul
2010-09-05util: Helper function to determined whether two formats can be memcpy'ed.José Fonseca
These are the non-trivial conversions that this function recognizes, which was produced by u_format_compatible_test.c: b8g8r8a8_unorm -> b8g8r8x8_unorm a8r8g8b8_unorm -> x8r8g8b8_unorm b5g5r5a1_unorm -> b5g5r5x1_unorm b4g4r4a4_unorm -> b4g4r4x4_unorm l8_unorm -> r8_unorm i8_unorm -> l8_unorm i8_unorm -> a8_unorm i8_unorm -> r8_unorm l16_unorm -> r16_unorm z24_unorm_s8_uscaled -> z24x8_unorm s8_uscaled_z24_unorm -> x8z24_unorm r8g8b8a8_unorm -> r8g8b8x8_unorm a8b8g8r8_srgb -> x8b8g8r8_srgb b8g8r8a8_srgb -> b8g8r8x8_srgb a8r8g8b8_srgb -> x8r8g8b8_srgb a8b8g8r8_unorm -> x8b8g8r8_unorm r10g10b10a2_uscaled -> r10g10b10x2_uscaled r10sg10sb10sa2u_norm -> r10g10b10x2_snorm State trackers and pipe drivers should be updated to take advantage of this knowledge, e.g., in surface_copy.
2010-09-05util: Utility function to determine the channels that can be written in a ↵José Fonseca
color format.
2010-08-10util: Add util_format_srgb().José Fonseca
To convert RGB -> SRGB format.
2010-07-02util: Add a fetch_rgba_8unorm.José Fonseca
Not always implemented, but useful in situations where we want 8unorms and the samples comes as 8unorms as we needlessly convert to/from floats.
2010-07-02util: Expose util_format_fits_8unorm().José Fonseca
2010-05-04gallium/util: added is_format_compressed()Brian Paul
2010-05-03util: add util_format_short_nameMarek Olšák
2010-05-03util: add util_format_is_plainMarek Olšák
2010-04-29util: Format error format string as the rest of the pipe formatsJakob Bornecrantz
2010-04-23gallium/util: document that pack/unpack strides are in bytesBrian Paul
2010-04-09util: Get all depth stencil tests passing.José Fonseca
Note the tests don't test all the paths, in particular stride, and ensuring the old value is preserved.
2010-04-09util: Add dedicated depth-stencil packing/unpacking functions.José Fonseca
Depth-stencil manually written given that each one is very close to be a special case. u_format_zs.c's still untested.
2010-04-08util: (Almost) universal format translation function.José Fonseca
Untested.
2010-04-03util: Revert unsolicited, untested, unreviewed, and broken changes to format ↵José Fonseca
support. Not all is bad, but I'm afraid I'll have to throw the baby with the water given they are all tied to together.
2010-04-02gallium/util: revert util_format_init additionLuca Barbieri
Putting calls to util_format_init all over the codebase is infeasible. Instead, half float tables are pregenerated, and the s3tc library is loaded on demand. I believe this is a solution that combines performance, cleanliness, flexibility and portability.
2010-04-02gallium/util: add util_format_is_supported to check for pack/unpackLuca Barbieri
This improves the code by making it more readable, and removes special knowledge of S3TC and other formats from softpipe.
2010-04-02gallium/util: add util_format_init that inits s3tc and util_halfLuca Barbieri
Switch from auto-init to explicit init for util_half per Brian Paul's indication. NOTE: this is probably broken because not enough things call util_format_init. Will be fixed shortly
2010-03-31util: Make the accessors bidimensional again.José Fonseca
Otherwise there's no way to unpack blocks with height >1
2010-03-31util: Describe PIPE_FORMAT_NONE as PIPE_FORMAT_R8_USCALED.José Fonseca
Avoids the need to special case PIPE_FORMAT_NONE so often. Conflicts: src/gallium/auxiliary/util/u_format_table.py
2010-03-31util: Add callback to fetch a single pixel.José Fonseca
2010-03-31util: Put the format pack/unpack functions in the description table.José Fonseca
2010-03-31util: Generalize lp_format_is_rgba8 into util_format_is_rgba8_variant.José Fonseca
2010-03-29util: Distinguish between the different compression formats.José Fonseca
In particular, all current uses of util_format_is_compressed() actually mean s3tc.
2010-03-09util: simplify util_format_get_nr_components helperRoland Scheidegger
since the number of components is now stored in the pipe format description, we obviously no longer need to figure this out ourselves.
2010-03-09Merge branch 'gallium-vertexelementcso'Roland Scheidegger
Conflicts: src/gallium/auxiliary/cso_cache/cso_context.c src/gallium/auxiliary/util/u_blit.c src/gallium/auxiliary/util/u_gen_mipmap.c src/gallium/drivers/i915/i915_context.h src/gallium/drivers/i965/brw_draw_upload.c src/gallium/drivers/r300/r300_blit.c src/gallium/drivers/r300/r300_context.h src/gallium/drivers/r300/r300_render.c src/gallium/drivers/r300/r300_state_derived.c src/mesa/state_tracker/st_cb_bitmap.c src/mesa/state_tracker/st_cb_clear.c
2010-03-06util: Add a new flag, for formats that can be described as a bitmask.José Fonseca
2010-03-06util: Add the shortened format name to the description.José Fonseca
2010-02-24util: Kill array vs arith layouts. Revamp UTIL_FORMAT_LAYOUT_xxx.José Fonseca
Too confusing. I now can get the same information through other means.
2010-02-24util: Kill unused UTIL_FORMAT_LAYOUT_SCALAR.José Fonseca
2010-02-24util: Store more derived data in the the format description.José Fonseca
2010-02-17util: new util_format_get_nr_components helperRoland Scheidegger
2010-02-14util: Add pf_name() replacement: util_format_name().José Fonseca
2010-02-01util: Add missing includes.José Fonseca
2009-12-24gallium/util: quieten compilerKeith Whitwell
2009-12-20util: util_format_get_blocksizebits() returns bits per block.Christoph Bumiller
2009-12-18util: Add util_format_has_alpha(), enclose in extern C.Michal Krol
2009-12-17Move the remaining format pf_get_* functions to u_format.h.Michal Krol
Previously they depended on format blocks, but after removing those they started depending on format encoding.
2009-12-17util: Remove util_format_get_block().Michal Krol
2009-12-17Merge branch 'master' into pipe-format-simplifyMichal Krol
Conflicts: src/gallium/auxiliary/draw/draw_pipe_aaline.c src/gallium/auxiliary/draw/draw_pipe_pstipple.c src/gallium/auxiliary/util/u_blit.c src/gallium/auxiliary/util/u_gen_mipmap.c src/gallium/auxiliary/util/u_surface.c src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c src/gallium/drivers/cell/ppu/cell_texture.c src/gallium/drivers/llvmpipe/lp_texture.c src/gallium/drivers/r300/r300_emit.c src/gallium/drivers/r300/r300_texture.c src/gallium/drivers/softpipe/sp_texture.c src/gallium/drivers/softpipe/sp_tile_cache.c src/gallium/drivers/svga/svga_state_vs.c src/gallium/include/pipe/p_format.h src/gallium/state_trackers/dri/dri_drawable.c src/gallium/state_trackers/egl/egl_surface.c src/gallium/state_trackers/python/p_device.i src/gallium/state_trackers/python/st_softpipe_winsys.c src/gallium/state_trackers/vega/api_filters.c src/gallium/state_trackers/vega/image.c src/gallium/state_trackers/vega/mask.c src/gallium/state_trackers/vega/paint.c src/gallium/state_trackers/vega/renderer.c src/gallium/state_trackers/vega/vg_tracker.c src/gallium/state_trackers/xorg/xorg_crtc.c src/gallium/state_trackers/xorg/xorg_dri2.c src/gallium/state_trackers/xorg/xorg_exa.c src/gallium/state_trackers/xorg/xorg_renderer.c src/gallium/state_trackers/xorg/xorg_xv.c src/gallium/state_trackers/xorg/xvmc/surface.c src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c src/gallium/winsys/drm/radeon/core/radeon_buffer.c src/gallium/winsys/egl_xlib/sw_winsys.c src/gallium/winsys/g3dvl/xlib/xsp_winsys.c src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c src/gallium/winsys/gdi/gdi_softpipe_winsys.c src/gallium/winsys/xlib/xlib_cell.c src/gallium/winsys/xlib/xlib_llvmpipe.c src/gallium/winsys/xlib/xlib_softpipe.c src/mesa/state_tracker/st_cb_fbo.c src/mesa/state_tracker/st_cb_texture.c src/mesa/state_tracker/st_texture.c
2009-12-17util/format: Fix bogus assertion.Michal Krol
2009-12-09Revert "Simplify the redundant meaning of format layout."Michal Krol
This reverts commit eb926ddf9eee1095c7fc12013f0b8375bbaeca6f.
2009-12-09util: Document the meaning of util_format_layout.José Fonseca
The util_format_layout name was unfortunate and there are as been a lot of confusion due to this. Hopefully this will shed some light on what it was meant for. Bottom line is: do not rely on these values unless you're automatically code generating pixel packing/unpacking routines. Suggestions for better names than util_format_layout are welcome!
2009-12-08Simplify the redundant meaning of format layout.Michal Krol
We really just need to know whether the format is compressed or not. For more detailed information format colorspace should suffice.
2009-12-08util/format: Remove unreferenced local.Michal Krol
2009-12-03Move pf_get_component_bits() to u_format auxiliary module.Michal Krol
2009-12-03Move pf_get_bits/size() to u_format auxiliary module.Michal Krol
2009-12-03Move pf_get_block() to u_format auxiliary module.Michal Krol
2009-12-03Move pf_is_depth_and_stencil() to u_format auxiliary module.Michal Krol
2009-12-03Move pf_is_depth_stencil() to u_format auxiliary module.Michal Krol