util: Move gallium's PIPE_FORMAT utils to /util/format/
authorEric Anholt <eric@anholt.net>
Thu, 27 Jun 2019 22:05:31 +0000 (15:05 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 14 Nov 2019 18:47:20 +0000 (10:47 -0800)
commit882ca6dfb0f3d17e0f8bc917307d915ab1718069
tree652b9932fc1182d4d191d7970fcd10c3687fbd3b
parentac78ca4b39ce6e927f824b928d17f30c1d9273ce
util: Move gallium's PIPE_FORMAT utils to /util/format/

To make PIPE_FORMATs usable from non-gallium parts of Mesa, I want to
move their helpers out of gallium.  Since u_format used
util_copy_rect(), I moved that in there, too.

I've put it in a separate directory in util/ because it's a big chunk
of related code, and it's not clear to me whether we might want it as
a separate library from libmesa_util at some point.

Closes: #1905
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
357 files changed:
src/broadcom/compiler/nir_to_vir.c
src/broadcom/compiler/v3d_nir_lower_logic_ops.c
src/freedreno/ir3/ir3_shader.c
src/gallium/auxiliary/Android.mk
src/gallium/auxiliary/Makefile.sources
src/gallium/auxiliary/SConscript
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_pipe_aaline.c
src/gallium/auxiliary/draw/draw_pipe_offset.c
src/gallium/auxiliary/draw/draw_pipe_pstipple.c
src/gallium/auxiliary/draw/draw_pt.c
src/gallium/auxiliary/draw/draw_pt_fetch.c
src/gallium/auxiliary/driver_ddebug/dd_draw.c
src/gallium/auxiliary/driver_noop/noop_pipe.c
src/gallium/auxiliary/driver_rbug/rbug_core.c
src/gallium/auxiliary/driver_trace/tr_dump.c
src/gallium/auxiliary/driver_trace/tr_dump_defines.h
src/gallium/auxiliary/driver_trace/tr_dump_state.c
src/gallium/auxiliary/driver_trace/tr_screen.c
src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c
src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c
src/gallium/auxiliary/gallivm/lp_bld_sample.c
src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
src/gallium/auxiliary/gallivm/lp_bld_type.h
src/gallium/auxiliary/hud/hud_context.c
src/gallium/auxiliary/meson.build
src/gallium/auxiliary/renderonly/renderonly.c
src/gallium/auxiliary/tgsi/tgsi_info.h
src/gallium/auxiliary/translate/translate_generic.c
src/gallium/auxiliary/translate/translate_sse.c
src/gallium/auxiliary/util/u_blit.c
src/gallium/auxiliary/util/u_blitter.c
src/gallium/auxiliary/util/u_compute.c
src/gallium/auxiliary/util/u_debug_describe.c
src/gallium/auxiliary/util/u_debug_gallium.c
src/gallium/auxiliary/util/u_debug_image.c
src/gallium/auxiliary/util/u_draw.c
src/gallium/auxiliary/util/u_dump_state.c
src/gallium/auxiliary/util/u_format.c [deleted file]
src/gallium/auxiliary/util/u_format.csv [deleted file]
src/gallium/auxiliary/util/u_format.h [deleted file]
src/gallium/auxiliary/util/u_format_bptc.c [deleted file]
src/gallium/auxiliary/util/u_format_bptc.h [deleted file]
src/gallium/auxiliary/util/u_format_etc.c [deleted file]
src/gallium/auxiliary/util/u_format_etc.h [deleted file]
src/gallium/auxiliary/util/u_format_latc.c [deleted file]
src/gallium/auxiliary/util/u_format_latc.h [deleted file]
src/gallium/auxiliary/util/u_format_other.c [deleted file]
src/gallium/auxiliary/util/u_format_other.h [deleted file]
src/gallium/auxiliary/util/u_format_pack.py [deleted file]
src/gallium/auxiliary/util/u_format_parse.py [deleted file]
src/gallium/auxiliary/util/u_format_rgtc.c [deleted file]
src/gallium/auxiliary/util/u_format_rgtc.h [deleted file]
src/gallium/auxiliary/util/u_format_s3tc.c [deleted file]
src/gallium/auxiliary/util/u_format_s3tc.h [deleted file]
src/gallium/auxiliary/util/u_format_table.py [deleted file]
src/gallium/auxiliary/util/u_format_tests.c [deleted file]
src/gallium/auxiliary/util/u_format_tests.h [deleted file]
src/gallium/auxiliary/util/u_format_yuv.c [deleted file]
src/gallium/auxiliary/util/u_format_yuv.h [deleted file]
src/gallium/auxiliary/util/u_format_zs.c [deleted file]
src/gallium/auxiliary/util/u_format_zs.h [deleted file]
src/gallium/auxiliary/util/u_gen_mipmap.c
src/gallium/auxiliary/util/u_pack_color.h
src/gallium/auxiliary/util/u_pstipple.c
src/gallium/auxiliary/util/u_resource.c
src/gallium/auxiliary/util/u_sampler.c
src/gallium/auxiliary/util/u_surface.c
src/gallium/auxiliary/util/u_surface.h
src/gallium/auxiliary/util/u_tests.c
src/gallium/auxiliary/util/u_threaded_context.c
src/gallium/auxiliary/util/u_tile.c
src/gallium/auxiliary/util/u_transfer_helper.c
src/gallium/auxiliary/util/u_vbuf.c
src/gallium/auxiliary/vl/vl_deint_filter.c
src/gallium/auxiliary/vl/vl_vertex_buffers.c
src/gallium/auxiliary/vl/vl_video_buffer.c
src/gallium/drivers/etnaviv/etnaviv_etc2.c
src/gallium/drivers/etnaviv/etnaviv_format.h
src/gallium/drivers/etnaviv/etnaviv_transfer.c
src/gallium/drivers/etnaviv/etnaviv_translate.h
src/gallium/drivers/freedreno/a2xx/fd2_program.c
src/gallium/drivers/freedreno/a2xx/fd2_screen.c
src/gallium/drivers/freedreno/a2xx/fd2_util.c
src/gallium/drivers/freedreno/a3xx/fd3_draw.c
src/gallium/drivers/freedreno/a3xx/fd3_emit.c
src/gallium/drivers/freedreno/a3xx/fd3_format.c
src/gallium/drivers/freedreno/a3xx/fd3_format.h
src/gallium/drivers/freedreno/a3xx/fd3_gmem.c
src/gallium/drivers/freedreno/a3xx/fd3_program.c
src/gallium/drivers/freedreno/a3xx/fd3_screen.c
src/gallium/drivers/freedreno/a3xx/fd3_texture.c
src/gallium/drivers/freedreno/a4xx/fd4_emit.c
src/gallium/drivers/freedreno/a4xx/fd4_format.c
src/gallium/drivers/freedreno/a4xx/fd4_gmem.c
src/gallium/drivers/freedreno/a4xx/fd4_program.c
src/gallium/drivers/freedreno/a4xx/fd4_screen.c
src/gallium/drivers/freedreno/a4xx/fd4_texture.c
src/gallium/drivers/freedreno/a5xx/fd5_emit.c
src/gallium/drivers/freedreno/a5xx/fd5_format.c
src/gallium/drivers/freedreno/a5xx/fd5_gmem.c
src/gallium/drivers/freedreno/a5xx/fd5_program.c
src/gallium/drivers/freedreno/a5xx/fd5_screen.c
src/gallium/drivers/freedreno/a5xx/fd5_texture.c
src/gallium/drivers/freedreno/a6xx/fd6_emit.c
src/gallium/drivers/freedreno/a6xx/fd6_format.c
src/gallium/drivers/freedreno/a6xx/fd6_gmem.c
src/gallium/drivers/freedreno/a6xx/fd6_program.c
src/gallium/drivers/freedreno/a6xx/fd6_screen.c
src/gallium/drivers/freedreno/a6xx/fd6_texture.c
src/gallium/drivers/freedreno/freedreno_draw.c
src/gallium/drivers/freedreno/freedreno_gmem.c
src/gallium/drivers/freedreno/freedreno_resource.c
src/gallium/drivers/freedreno/freedreno_screen.c
src/gallium/drivers/freedreno/freedreno_util.c
src/gallium/drivers/freedreno/ir3/ir3_gallium.c
src/gallium/drivers/i915/i915_clear.c
src/gallium/drivers/i915/i915_resource_texture.c
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/i915/i915_state_emit.c
src/gallium/drivers/i915/i915_surface.c
src/gallium/drivers/iris/iris_blit.c
src/gallium/drivers/iris/iris_clear.c
src/gallium/drivers/iris/iris_context.c
src/gallium/drivers/iris/iris_formats.c
src/gallium/drivers/iris/iris_resource.c
src/gallium/drivers/iris/iris_screen.c
src/gallium/drivers/iris/iris_state.c
src/gallium/drivers/lima/lima_draw.c
src/gallium/drivers/lima/lima_resource.c
src/gallium/drivers/llvmpipe/lp_bld_alpha.c
src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
src/gallium/drivers/llvmpipe/lp_bld_depth.c
src/gallium/drivers/llvmpipe/lp_rast_priv.h
src/gallium/drivers/llvmpipe/lp_scene.c
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/llvmpipe/lp_state_fs.c
src/gallium/drivers/llvmpipe/lp_state_surface.c
src/gallium/drivers/llvmpipe/lp_test.h
src/gallium/drivers/llvmpipe/lp_test_format.c
src/gallium/drivers/llvmpipe/lp_texture.c
src/gallium/drivers/nouveau/nouveau_screen.c
src/gallium/drivers/nouveau/nouveau_video.c
src/gallium/drivers/nouveau/nouveau_vp3_video.c
src/gallium/drivers/nouveau/nv30/nv30_miptree.c
src/gallium/drivers/nouveau/nv30/nv30_push.c
src/gallium/drivers/nouveau/nv30/nv30_resource.c
src/gallium/drivers/nouveau/nv30/nv30_screen.c
src/gallium/drivers/nouveau/nv30/nv30_state.c
src/gallium/drivers/nouveau/nv30/nv30_state_validate.c
src/gallium/drivers/nouveau/nv30/nv30_texture.c
src/gallium/drivers/nouveau/nv30/nv30_vbo.c
src/gallium/drivers/nouveau/nv50/nv50_blit.h
src/gallium/drivers/nouveau/nv50/nv50_miptree.c
src/gallium/drivers/nouveau/nv50/nv50_push.c
src/gallium/drivers/nouveau/nv50/nv50_resource.c
src/gallium/drivers/nouveau/nv50/nv50_screen.c
src/gallium/drivers/nouveau/nv50/nv50_surface.c
src/gallium/drivers/nouveau/nv50/nv50_tex.c
src/gallium/drivers/nouveau/nv50/nv50_transfer.c
src/gallium/drivers/nouveau/nv50/nv50_vbo.c
src/gallium/drivers/nouveau/nv50/nv84_video.c
src/gallium/drivers/nouveau/nv50/nv98_video.c
src/gallium/drivers/nouveau/nvc0/nvc0_miptree.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
src/gallium/drivers/nouveau/nvc0/nvc0_transfer.c
src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
src/gallium/drivers/nouveau/nvc0/nvc0_vbo_translate.c
src/gallium/drivers/nouveau/nvc0/nvc0_video.c
src/gallium/drivers/panfrost/nir/nir_lower_framebuffer.c
src/gallium/drivers/panfrost/pan_afbc.c
src/gallium/drivers/panfrost/pan_blending.c
src/gallium/drivers/panfrost/pan_blit.c
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_format.h
src/gallium/drivers/panfrost/pan_fragment.c
src/gallium/drivers/panfrost/pan_job.c
src/gallium/drivers/panfrost/pan_mfbd.c
src/gallium/drivers/panfrost/pan_resource.c
src/gallium/drivers/panfrost/pan_screen.c
src/gallium/drivers/panfrost/pan_sfbd.c
src/gallium/drivers/r300/r300_blit.c
src/gallium/drivers/r300/r300_emit.c
src/gallium/drivers/r300/r300_fs.c
src/gallium/drivers/r300/r300_hyperz.c
src/gallium/drivers/r300/r300_render.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r300/r300_state_inlines.h
src/gallium/drivers/r300/r300_texture.c
src/gallium/drivers/r300/r300_texture_desc.c
src/gallium/drivers/r300/r300_transfer.c
src/gallium/drivers/r600/r600_blit.c
src/gallium/drivers/r600/r600_formats.h
src/gallium/drivers/r600/r600_pipe_common.c
src/gallium/drivers/r600/r600_state_common.c
src/gallium/drivers/r600/r600_texture.c
src/gallium/drivers/radeonsi/Android.mk
src/gallium/drivers/radeonsi/gfx10_format_table.py
src/gallium/drivers/radeonsi/meson.build
src/gallium/drivers/radeonsi/si_blit.c
src/gallium/drivers/radeonsi/si_clear.c
src/gallium/drivers/radeonsi/si_compute_blit.c
src/gallium/drivers/radeonsi/si_descriptors.c
src/gallium/drivers/radeonsi/si_dma.c
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_texture.c
src/gallium/drivers/softpipe/sp_buffer.c
src/gallium/drivers/softpipe/sp_image.c
src/gallium/drivers/softpipe/sp_quad_blend.c
src/gallium/drivers/softpipe/sp_quad_depth_test.c
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/drivers/softpipe/sp_state_sampler.c
src/gallium/drivers/softpipe/sp_state_so.c
src/gallium/drivers/softpipe/sp_state_surface.c
src/gallium/drivers/softpipe/sp_surface.c
src/gallium/drivers/softpipe/sp_tex_sample.c
src/gallium/drivers/softpipe/sp_tex_tile_cache.c
src/gallium/drivers/softpipe/sp_texture.c
src/gallium/drivers/softpipe/sp_tile_cache.c
src/gallium/drivers/svga/svga_format.c
src/gallium/drivers/svga/svga_pipe_blit.c
src/gallium/drivers/svga/svga_pipe_sampler.c
src/gallium/drivers/svga/svga_pipe_vertex.c
src/gallium/drivers/svga/svga_resource_texture.c
src/gallium/drivers/svga/svga_sampler_view.c
src/gallium/drivers/svga/svga_screen.c
src/gallium/drivers/svga/svga_shader.c
src/gallium/drivers/svga/svga_state_constants.c
src/gallium/drivers/svga/svga_state_framebuffer.c
src/gallium/drivers/svga/svga_state_fs.c
src/gallium/drivers/svga/svga_state_rss.c
src/gallium/drivers/svga/svga_state_sampler.c
src/gallium/drivers/svga/svga_surface.c
src/gallium/drivers/swr/swr_context.cpp
src/gallium/drivers/swr/swr_screen.cpp
src/gallium/drivers/swr/swr_screen.h
src/gallium/drivers/swr/swr_shader.cpp
src/gallium/drivers/swr/swr_state.cpp
src/gallium/drivers/v3d/v3d_blit.c
src/gallium/drivers/v3d/v3d_program.c
src/gallium/drivers/v3d/v3d_resource.c
src/gallium/drivers/v3d/v3d_screen.c
src/gallium/drivers/v3d/v3dx_draw.c
src/gallium/drivers/v3d/v3dx_emit.c
src/gallium/drivers/v3d/v3dx_format_table.c
src/gallium/drivers/v3d/v3dx_rcl.c
src/gallium/drivers/v3d/v3dx_state.c
src/gallium/drivers/vc4/vc4_blit.c
src/gallium/drivers/vc4/vc4_draw.c
src/gallium/drivers/vc4/vc4_formats.c
src/gallium/drivers/vc4/vc4_nir_lower_blend.c
src/gallium/drivers/vc4/vc4_nir_lower_io.c
src/gallium/drivers/vc4/vc4_program.c
src/gallium/drivers/vc4/vc4_resource.c
src/gallium/drivers/vc4/vc4_screen.c
src/gallium/drivers/virgl/virgl_context.c
src/gallium/drivers/virgl/virgl_encode.c
src/gallium/drivers/virgl/virgl_resource.c
src/gallium/drivers/virgl/virgl_screen.c
src/gallium/drivers/virgl/virgl_texture.c
src/gallium/drivers/zink/zink_blit.c
src/gallium/drivers/zink/zink_context.c
src/gallium/drivers/zink/zink_resource.c
src/gallium/drivers/zink/zink_screen.c
src/gallium/drivers/zink/zink_surface.c
src/gallium/state_trackers/clover/core/memory.cpp
src/gallium/state_trackers/clover/core/resource.cpp
src/gallium/state_trackers/dri/dri2.c
src/gallium/state_trackers/dri/dri_drawable.c
src/gallium/state_trackers/dri/dri_screen.c
src/gallium/state_trackers/dri/drisw.c
src/gallium/state_trackers/hgl/hgl.c
src/gallium/state_trackers/nine/adapter9.c
src/gallium/state_trackers/nine/basetexture9.c
src/gallium/state_trackers/nine/device9.c
src/gallium/state_trackers/nine/nine_pipe.h
src/gallium/state_trackers/nine/vertexdeclaration9.c
src/gallium/state_trackers/nine/volume9.c
src/gallium/state_trackers/osmesa/osmesa.c
src/gallium/state_trackers/vdpau/device.c
src/gallium/state_trackers/vdpau/output.c
src/gallium/state_trackers/wgl/stw_ext_pixelformat.c
src/gallium/state_trackers/wgl/stw_pixelformat.c
src/gallium/state_trackers/xvmc/subpicture.c
src/gallium/tests/graw/graw_util.h
src/gallium/tests/trivial/compute.c
src/gallium/tests/unit/translate_test.c
src/gallium/tests/unit/u_format_compatible_test.c
src/gallium/tests/unit/u_format_test.c
src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
src/gallium/winsys/freedreno/drm/freedreno_drm_winsys.c
src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
src/gallium/winsys/radeon/drm/radeon_drm_surface.c
src/gallium/winsys/svga/drm/vmw_screen_dri.c
src/gallium/winsys/sw/dri/dri_sw_winsys.c
src/gallium/winsys/sw/gdi/gdi_sw_winsys.c
src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
src/gallium/winsys/sw/xlib/xlib_sw_winsys.c
src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c
src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
src/mesa/state_tracker/st_atom_framebuffer.c
src/mesa/state_tracker/st_atom_sampler.c
src/mesa/state_tracker/st_atom_texture.c
src/mesa/state_tracker/st_cb_blit.c
src/mesa/state_tracker/st_cb_clear.c
src/mesa/state_tracker/st_cb_copyimage.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_eglimage.c
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_cb_readpixels.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_draw.c
src/mesa/state_tracker/st_format.c
src/mesa/state_tracker/st_gen_mipmap.c
src/mesa/state_tracker/st_manager.c
src/mesa/state_tracker/st_pbo.c
src/mesa/state_tracker/st_sampler_view.c
src/mesa/state_tracker/st_texture.c
src/mesa/state_tracker/tests/st_format.c
src/util/Android.mk
src/util/Makefile.sources
src/util/SConscript
src/util/format/meson.build [new file with mode: 0644]
src/util/format/u_format.c [new file with mode: 0644]
src/util/format/u_format.csv [new file with mode: 0644]
src/util/format/u_format.h [new file with mode: 0644]
src/util/format/u_format_bptc.c [new file with mode: 0644]
src/util/format/u_format_bptc.h [new file with mode: 0644]
src/util/format/u_format_etc.c [new file with mode: 0644]
src/util/format/u_format_etc.h [new file with mode: 0644]
src/util/format/u_format_latc.c [new file with mode: 0644]
src/util/format/u_format_latc.h [new file with mode: 0644]
src/util/format/u_format_other.c [new file with mode: 0644]
src/util/format/u_format_other.h [new file with mode: 0644]
src/util/format/u_format_pack.py [new file with mode: 0644]
src/util/format/u_format_parse.py [new file with mode: 0644]
src/util/format/u_format_rgtc.c [new file with mode: 0644]
src/util/format/u_format_rgtc.h [new file with mode: 0644]
src/util/format/u_format_s3tc.c [new file with mode: 0644]
src/util/format/u_format_s3tc.h [new file with mode: 0644]
src/util/format/u_format_table.py [new file with mode: 0644]
src/util/format/u_format_tests.c [new file with mode: 0644]
src/util/format/u_format_tests.h [new file with mode: 0644]
src/util/format/u_format_yuv.c [new file with mode: 0644]
src/util/format/u_format_yuv.h [new file with mode: 0644]
src/util/format/u_format_zs.c [new file with mode: 0644]
src/util/format/u_format_zs.h [new file with mode: 0644]
src/util/meson.build