• Home
  • History
  • Annotate
  • only in /external/mesa3d/src/gallium/auxiliary/translate/
History log of /external/mesa3d/src/gallium/auxiliary/translate/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7528e2104fdda88a9eca5d84d979a21f5c517dc9 07-Aug-2012 Vinson Lee <vlee@freedesktop.org> translate: Fix typo in is_legal_int_format_combo.

Fixes same on both sides defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
ranslate_generic.c
fa8dcb848f9380e3daa3568563c23d9e21668bda 20-Jun-2012 José Fonseca <jfonseca@vmware.com> translate: Free elt8_func/elt16_func too.

These were leaking.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
ranslate_sse.c
d1f11ed3eff405561fd94ed05a9f0e5e049f0908 02-Jan-2012 Marek Olšák <maraeo@gmail.com> translate: implement translation of 10_10_10_2 types

This is for GL_ARB_vertex_type_2_10_10_10_rev.
I just took the code from u_format_table.c. It's based on pack_rgba_float.
I had no other choice. The u_format hooks are not exactly compatible
with translate. The cleanup of it is left for future work.

Reviewed-by: Dave Airlie <airlied@redhat.com>
ranslate_generic.c
0a8a7144a152eba0e1bd955b7a423ed5336a9f31 02-Jan-2012 Marek Olšák <maraeo@gmail.com> translate: implement translation of (pure) integer formats

The conversion is limited to only a few cases, because converting to any other
type shouldn't happen in any driver.

Reviewed-by: Dave Airlie <airlied@redhat.com>
ranslate_generic.c
1acef6a7465e8c54dc10a43c9e7278d4506c1d5e 01-Jan-2012 Marek Olšák <maraeo@gmail.com> translate: implement translation of half floats in the generic codepath
ranslate_generic.c
37ef7c22ab3ab9ac976ad955197fe80fae5bf8b8 21-Sep-2011 Brian Paul <brianp@vmware.com> translate: check for PIPE_SUBSYSTEM_EMBEDDED
ranslate_sse.c
f4dd0991719ef3e2606920c5100b372181c60899 06-Sep-2011 José Fonseca <jfonseca@vmware.com> rtasm,translate: Disable on Mingw-w64.

Causes crash and stack corruption.

Needs more investigation. Disable for now.
ranslate_sse.c
8b7f760f835f870b8f6af6c4d6613d44440f1dc5 20-Apr-2011 Brian Paul <brianp@vmware.com> translate: disable clamping of instanced array indexes

This fixes piglit's draw-instanced-divisor test for softpipe on both
the generic and SSE paths. This is temporary until we have the
correct per-array max_index information.
ranslate_generic.c
ranslate_sse.c
41b38bd21c1031e65799c888a97d8a0c14ea2aaa 15-Apr-2011 Brian Paul <brianp@vmware.com> translate: s/varient/variant/
ranslate_sse.c
17bbc1f0425b3768e26473eccea5f2570dcb26d3 01-Apr-2011 José Fonseca <jfonseca@vmware.com> translate: Respect translate_buffer::max_index.
ranslate_sse.c
c48dd8049ccc46c075c9836c4bd3a66ed3edd83a 24-Jan-2011 Tim Wiederhake <twied@gmx.net> secure malloc in translate_cache_create

Signed-off-by: Brian Paul <brianp@vmware.com>
ranslate_cache.c
af03c14d4cc82eaeb884fe19171bfbb23b5dc75e 25-Oct-2010 Brian Paul <brianp@vmware.com> translate: remove unused prototypes
ranslate.h
81d5afbbecce4ccf2b4bf10b10f47585febfe9c8 25-Oct-2010 Brian Paul <brianp@vmware.com> translate: use function typedefs, casts to silence warnings
ranslate.h
ranslate_sse.c
6b6b45403740144fa5ef2ce362a4c5b9fd0066b6 24-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> translate_sse: clear state for each function emission

Fixes #29771.
ranslate_sse.c
d1e6b31cb848ed79dd82849f277ab07c9bcdd707 23-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> translate_sse: fix x86-64
ranslate_sse.c
8e632666af494219c77072056e8ca0e9cd09f5fa 22-Aug-2010 Jakob Bornecrantz <wallbraker@gmail.com> translate_sse: add R32G32B32A32_FLOAT -> X8X8X8X8_UNORM for EMIT_4UB

Changed by me to use movd instead of movss to avoid penalties.
ranslate_sse.c
4f3fedcef735cda34aa04416950b5febb64435fc 22-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> translate_sse: refactor constant management
ranslate_sse.c
2a7493ada4503db855ed35031d48fcf2a31eded3 22-Aug-2010 Vinson Lee <vlee@vmware.com> translate_sse: Silence uninitialized variable warnings.

Initialize variables on error paths.
ranslate_sse.c
d3fe699b0b2d46480b699b3fa4c77e41eea8d30d 20-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> translate_sse: enable on Win64

According to Vinson, enabling it causes no regressions
ranslate.c
18f207310b3c7dd7207d56e86a80b2e1d23c5364 19-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> translate_sse: fix emit_load_sse2
ranslate_sse.c
547e88e70de16a3d0451c2aa33f87014adc8bb7c 18-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> translate_sse: don't overwrite source buffer pointer

We were putting the source pointer in a register used as a temporary,
breaking all paths that don't read the data in a single instruction.
ranslate_sse.c
f437ee85f4a6789d7c3be0d68fd26aa257557b83 16-Aug-2010 Vinson Lee <vlee@vmware.com> translate: Move loop variable declaration outside for loop.

Fixes MSVC build.
ranslate_sse.c
b421cb954673e487074c806d6f98722e46abd4f0 16-Aug-2010 José Fonseca <jfonseca@vmware.com> translate: Remove unused temporary register.

Assuming the side-effect of x86_make_reg is also unnecessary.
ranslate_sse.c
ded92e5dd8eb39bf2a486a6ce95cbef595149582 16-Aug-2010 José Fonseca <jfonseca@vmware.com> translate: Eliminate void pointer arithmetic.

Non-portable.
ranslate_generic.c
c2da8e77023325f46dde2009def2947b1a687c7b 10-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> translate_sse: major rewrite (v5)

NOTE: Win64 is untested, and is thus currently disabled.
If you have such a system, please enable it and report whether it works.
To enable it, change src/gallium/auxiliary/translate/translate.c

Changes in v5:
- On Win64, preserve %xmm6 and %xmm7 as required by the ABI
- Use _WIN64 instead of WIN64

Changes in v4:
- Use x86_target() and x86_target_caps()
- Enable translate_sse in x86-64, but not in Win64

Changes in v3:
- Win64 support (untested)
- Use u_cpu_detect.h constants instead of #ifs

Changes in v2:
- Minimize #ifs
- Give a name to magic number CHANNELS_0001
- Add support for CPUs without SSE (only memcpy and swizzles, like non SSE2)
- Fixed comments

translate_sse is currently very limited to the point of
being useless in essentially all cases.

In particular, it only support some float32 and unorm8
formats and doesn't work on x86-64.

This commit rewrites it to support:
1. Dumb memory copy for any pair of identical formats
2. All formats that are swizzles of each other
3. Converting 32/64-bit floats and all 8/16/32-bit integers to 32-bit float
4. Converting unorm8/snorm8 to snorm16 and uscaled8/sscaled8 to sscaled16
5. Support for x86-64 (doesn't take advantage of it in any way though)

This new translate can even be useful to translate index buffers for
cards that lack 8-bit index support.

It passes the testsuite I wrote, but note that this is a major change, and more
testing would be great.
ranslate.c
ranslate_sse.c
4a4e29a9ab96d44fca9bb25064e12715aac85cbd 10-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> translate: add support for 8/16-bit indices

Currently, only 32-bit indices are supported, but some use cases
translate needs support for all types.
ranslate.h
ranslate_generic.c
ranslate_sse.c
68e74f1b0110348a44f589739c6edf3fe8e2b368 10-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> translate_sse: remove useless generated function wrappers

Currently translate_sse puts two trivial wrappers in the translate vtable.

These slow it down and enlarge the source code for no gain, except perhaps
the ability to set a breakpoint there, so remove them.

Breakpoints can be set on the caller of the translate functions, with no
loss of functionality.
ranslate_sse.c
1cb92fb92e69b5b138293398a98665c2a3c63a5b 10-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> translate_generic: factor out common code between linear and indexed

This moves the common code into a separate ALWAYS_INLINE function.
ranslate_generic.c
ddcf028aa0a1bd6f79381164c8b1c3b816792e47 10-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> translate_generic: use memcpy if possible (v3)

Changes in v3:
- If we can do a copy, don't try to get an emit func, as that can assert(0)

Changes in v2:
- Add comment regarding copy_size

When used in GPU drivers, translate can be used to simultaneously
perform a gather operation, and convert away from unsupported formats.

In this use case, input and output formats will often be identical: clearly
it would make sense to use a memcpy in this case.

Instead, translate will insist to convert to and from 32-bit floating point
numbers.

This is not only extremely expensive, but it also loses precision for
32/64-bit integers and 64-bit floating point numbers.

This patch changes translate_generic to just use memcpy if the formats are
identical, non-blocked, and with an integral number of bytes per pixel (note
that all sensible vertex formats are like this).
ranslate_generic.c
10adb7840c3a37dedc940fe593b246336eebd71e 11-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> translate: allow clients to ask for supported output formats

Currently translate asserts on unsupported output formats, making
it impossible to use for some purposes, such as testing whether it
actually works on all formats it supports.

Removing the assert was met with opposition, so this change allows
clients to ask whether an output format is supported, and they are thus
able to avoid attempting to use it.

Since this is just an addition to the API, no adverse effect is
possible, and it makes the testsuite work again.
ranslate.c
ranslate.h
ranslate_generic.c
5266bc3c60033ccc3515b3a6d02f7219f981cbb1 11-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> Revert "translate_generic: return NULL instead of assert(0) if format not supported"

This reverts commit 16b45ca7cefb3432b4133fe9d0b1dbfe3f286131.

José Fonseca asked for a revert.

Note that the testsuite will now segfault since it attempts to test
all possible formats.
ranslate_generic.c
684aeb366fb72a2dbf9dd7a0803f29880858cd06 11-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> translate_generic: fix broken A8R8G8B8_UNORM output

translate was attempting to output A8R8G8B8_UNORM as if it were
R8G8B8A8_UNORM.

Now the tests just added pass.
ranslate_generic.c
16b45ca7cefb3432b4133fe9d0b1dbfe3f286131 11-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> translate_generic: return NULL instead of assert(0) if format not supported

This gives the caller a chance to recover (or crash anyway otherwise).
ranslate_generic.c
e89e47e6d03f0c8b421268481d077100c2247253 04-Aug-2010 Brian Paul <brianp@vmware.com> gallium/translate: make generic_run() and generic_run_elts() more alike

Plus more debug code and do clamping in generic_run().
ranslate_generic.c
668fa68019ec09fcd0486e612d01d61a0c9a4b2f 16-Jun-2010 Zack Rusin <zackr@vmware.com> translate: don't crash on elts paths with instances
ranslate_generic.c
4b891234f81d441426a62abcff96720022d2ac3d 03-May-2010 José Fonseca <jfonseca@vmware.com> translate: Make translate_generic truly generic.

PIPE_FORMAT_R10G10B10X2_USCALED, half floats, were not supported, so
just rely on u_format for (almost) universal format support.
ranslate_generic.c
fc431a58dc1446383edc11aec2a0b7de5b363e5e 26-Apr-2010 José Fonseca <jfonseca@vmware.com> translate: Take and respect a max_index argument.
ranslate.h
ranslate_generic.c
ranslate_sse.c
c16d04bd2939154c0360f1ac51fe61a86e5dd9e5 09-Mar-2010 Marek Olšák <maraeo@gmail.com> gallium: fix BGRA vertex color swizzles

The mapping for vertex_array_bgra:
(gl -> st -> translate)
GL_RGBA -> PIPE_FORMAT_R8G8B8A8 (RGBA) -> no swizzle (XYZW)
GL_BGRA -> PIPE_FORMAT_A8R8G8B8 (ARGB) -> ZYXW (BGRA again??)

Iẗ́'s pretty clear that PIPE_FORMAT_A8R8G8B8 here is wrong. This commit
fixes the pipe format and removes obvious workarounds in util/translate.

Tested with: softpipe, llvmpipe, r300g.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
ranslate_generic.c
ranslate_sse.c
a48975347126aacf3a82a5b3e3c69bffd491020a 01-Mar-2010 José Fonseca <jfonseca@vmware.com> translate: Rename pipe formats.
ranslate_generic.c
ranslate_sse.c
76ff89d2de3807f316954aa97ffdbb51bb3b6966 05-Jan-2010 Michal Krol <michal@vmware.com> gallium: Handle InstanceID as a true 32-bit uint.
ranslate_sse.c
9b21b3c52a8a7d58d08151d1a6bf25c472dec213 05-Jan-2010 Michal Krol <michal@vmware.com> Merge branch 'master' into instanced-arrays

Conflicts:
src/gallium/auxiliary/tgsi/tgsi_dump.c
src/gallium/include/pipe/p_shader_tokens.h
c847a13d38d4e8c5f4c386d060dcc8ec09e491a3 01-Jan-2010 José Fonseca <jfonseca@vmware.com> gallium: Generate a single library for auxiliaries with Make too.
akefile
f8f4757d46627fb453f08dc63fde3d7f458eafe2 31-Dec-2009 José Fonseca <jfonseca@vmware.com> scons: Aggregate all tiny libraries in a single library.

Makes integration of gallium into out of tree components much easier. No
pratical change for components in this tree,
Conscript
543b9566bdaa48fea2df1866fa1310c1cdbcde27 30-Dec-2009 Michal Krol <michal@vmware.com> Add lame support for instanceID to draw module.

It's all screaming for integer support -- fake it with float for now.
ranslate.h
ranslate_generic.c
ranslate_sse.c
5007e39f76c897b8f3aa4acf6086c8b7ac30bdef 30-Dec-2009 Michal Krol <michal@vmware.com> Implement instanced indexed draw.
ranslate.h
ranslate_generic.c
ranslate_sse.c
76e53923ba79124c6df55bddd7e9a11a7e9104d4 30-Dec-2009 Michal Krol <michal@vmware.com> translate: Fix a call to indexed SSE run.
ranslate_sse.c
09c0287b84725098c0b365668231ddf00487c84c 30-Dec-2009 Michal Krol <michal@vmware.com> translate: Implement instancing for linear SSE run.
ranslate_sse.c
7ca0ce38340144794267609646048b3820d594ab 29-Dec-2009 Michal Krol <michal@vmware.com> Implement draw_arrays_instanced() in softpipe.

Modify the translate module to respect instance divisors and accept
instance id as a parameter to calculate input vertex offset.
ranslate.h
ranslate_generic.c
ranslate_sse.c
7124fa16efe0f8ffb402bcd182f276032bed378d 29-Dec-2009 Michal Krol <michal@vmware.com> translate: Fix translate_key_compare().

Sizes of translate keys must also match.
ranslate.h
389021220d27c376b81a6221a31d0ee33c24e67f 02-Oct-2009 Brian Paul <brianp@vmware.com> gallium: replace // comments with /* */
ranslate_generic.c
573346da2a1de9a32b2673a5d4634aa6338da374 25-Mar-2009 José Fonseca <jfonseca@vmware.com> translate: Avoid unused variable warning.
ranslate.c
d9602e5144bc76b9791fa3382ca38c880df96198 20-Feb-2009 Jakob Bornecrantz <jakob@vmware.com> gallium: Improve makefiles for libraries

The template makefile that most libraries in
gallium included was based on dri and had a bunch
unrelevant junk in it.

Update it and improve the depending makefiles.
akefile
0557fa72c0e39a3cb4c241690b495ca142c06616 14-Nov-2008 Keith Whitwell <keith@tungstengraphics.com> translate: pull in prefetch and other optimizations from draw_vs_aos.c
ranslate.h
ranslate_sse.c
a563a27c07eee9f0278c8473e27853fa2d1ad119 03-Sep-2008 Brian Paul <brian.paul@tungstengraphics.com> gallium: silence warnings
ranslate_generic.c
4f25420bdd834e81a3e22733304efc5261c2998a 25-Aug-2008 Brian Paul <brian.paul@tungstengraphics.com> gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.h

Also, rename p_tile.[ch] to u_tile.[ch]
ranslate.c
ranslate_cache.c
ranslate_generic.c
ranslate_sse.c
d756f9512d295531ff6a600c736a68ac2dcff58b 13-Aug-2008 José Fonseca <jrfonseca@tungstengraphics.com> translate: Draw can request up to PIPE_MAX_ATTRIBS + 1 vertex elements.
ranslate.h
9dfa6063be5ea506cc5a43d352fa2f7dcfa68dff 24-Jun-2008 José Fonseca <jrfonseca@tungstengraphics.com> gallium: Avoid double arithmetic.
ranslate_generic.c
89e9d6b6db933c870443714c3d7c9539d117cddf 24-Jun-2008 Brian Paul <brian.paul@tungstengraphics.com> gallium: added support for fixed-point formats, drawing
ranslate_generic.c
3869c3c87a40d9f41414082ad8dd3d747e6b34d8 30-May-2008 Jakob Bornecrantz <jakob@tungstengraphics.com> Merge branch 'gallium-tex-surfaces' into gallium-0.1

Conflicts:

src/gallium/drivers/i915simple/i915_context.h
8808d62f608d1397ee75d0087301d0b0a0278244 29-May-2008 José Fonseca <jrfonseca@tungstengraphics.com> gallium: MSVC warning fixes.

Conflicts:

src/gallium/auxiliary/draw/draw_pt_varray.c
src/gallium/auxiliary/draw/draw_pt_varray_tmp.h
src/gallium/auxiliary/draw/draw_pt_vcache.c
ranslate_sse.c
4767c10cbb87a77e6cb24c53815c38bd5887c771 28-May-2008 José Fonseca <jrfonseca@tungstengraphics.com> translate: Mark functions as PIPE_CDECL.
ranslate_sse.c
938d9d596324e411fde5312f2bb65b444c502c37 28-May-2008 Jakob Bornecrantz <jakob@tungstengraphics.com> Merge branch 'gallium-vertex-linear' into gallium-0.1

Conflicts:

src/gallium/auxiliary/draw/draw_pt_varray.c
55d29a8d48663982a1aeea414f69a5896b97d1ea 28-May-2008 José Fonseca <jrfonseca@tungstengraphics.com> gallium: Windows CE portability fixes.
ranslate.c
ranslate_generic.c
ranslate_sse.c
b5c8b3fba6ac90a0d83e02bfe432142f1adee9e5 21-May-2008 Keith Whitwell <keith@tungstengraphics.com> translate: mark functions as PIPE_CDECL
ranslate.h
ranslate_generic.c
ranslate_sse.c
8618e6aa16bdba2c8b08124261bbaedaf7e22447 20-May-2008 Keith Whitwell <keith@tungstengraphics.com> translate: remove spurious comment
ranslate_sse.c
c0a6040f568e0c9be07797b2dc2fdd8a3624ec34 09-May-2008 Keith Whitwell <keith@tungstengraphics.com> translate: helper functions for mimizing cost of key compares
ranslate.h
80474d576c2e92441f6bcc18faae71a38b91bd70 09-May-2008 Keith Whitwell <keith@tungstengraphics.com> translate: helper functions for mimizing cost of key compares
ranslate.h
b514f5f3ba4c9cf6c39cbcdf5bf0d2d8efb8d19b 08-May-2008 Keith Whitwell <keith@tungstengraphics.com> draw: only fill in / compare the part of the translate key we're using.

It's quite a big struct & we examine it a lot (too much). Reduce
the impact of this by just looking at the active part where possible.
ranslate.h
fb3623b235f5caa9d76e656b1e5eda797c7c73eb 01-May-2008 Keith Whitwell <keith@tungstengraphics.com> rtasm: fix labels after (not so) recent change to allow dynamic fn growth

Using char * for labels doesn't work if you realloc the function
during assembly and free the old storage...
ranslate_sse.c
546ab045d8a18758ffc44da9dc76ad1335553cf6 25-Apr-2008 Keith Whitwell <keith@tungstengraphics.com> translate: squash warnings
ranslate_cache.c
ranslate_cache.h
d712eea074303812b1be0e79b302d7b9f49a09a8 24-Apr-2008 Michal Krol <michal@tungstengraphics.com> translate: Actually return a value from translate_cache_create().
ranslate_cache.c
5fcd84ab39318a371253b1a7285bc657fb82efed 23-Apr-2008 Zack Rusin <zack@tungstengraphics.com> Create a sharable translate_cache and use it.
akefile
Conscript
ranslate.h
ranslate_cache.c
ranslate_cache.h
6fc530ccda2971a5d99a955ad90ae9762238040f 22-Apr-2008 Ben Skeggs <skeggsb@gmail.com> fix non-i386 builds
ranslate.c
d3db46eb8257c1b0cf823f1805ca00457be9aff3 21-Apr-2008 Keith Whitwell <keith@tungstengraphics.com> translate: fail on x86 rtasm fail
ranslate_sse.c
d0a4bf08b1a80d62f81301c5b37723dfca436b62 19-Apr-2008 Keith Whitwell <keith@tungstengraphics.com> translate: fix several bugs

- specify cdecl calling convention on WIN32
- fix load bgra8 function
- fix previous don't crash fix.
ranslate_generic.c
ranslate_sse.c
b1158a5e0031aa33a71baa7bc14ca2c0fe0dabc4 19-Apr-2008 Keith Whitwell <keith@tungstengraphics.com> translate: don't crash on failure to create sse version
ranslate_generic.c
ranslate_sse.c
7b34a43d1ab74974bd157a2339d7a491aed9c9b4 18-Apr-2008 Keith Whitwell <keith@tungstengraphics.com> translate: missing file
ranslate.c
7400bc4b6fb0c20a935cd108afa92814eeafec6d 18-Apr-2008 Keith Whitwell <keith@tungstengraphics.com> translate: add sse version based on old draw_vf_sse.c
akefile
Conscript
ranslate.h
ranslate_sse.c
fd6acabd2f62fe006b078ae7640a944c7f65903c 16-Apr-2008 José Fonseca <jrfonseca@tungstengraphics.com> gallium: Get the translate module to build on msvc.

Appearently MSVC c-preprocessor parses "255.0f" as two tokens:
"255.0" and "f", and performs variable substitution on "f".
ranslate_generic.c
e2269e94c0ecaa97c7153815489e59c9ca64c243 16-Apr-2008 José Fonseca <jrfonseca@tungstengraphics.com> gallium: Build and link the translate module.
Conscript
a5a7dc24ba2dcf9bbdd73709c4c182e324bdc3a5 15-Apr-2008 Keith Whitwell <keith@tungstengraphics.com> gallium: Switch one vertex path over to new translate module

Will eventually do this for all instances where we are converting vertices
from one format to another.
ranslate.h
ranslate_generic.c
59f68f36c4ad37496e3ed5d7d3142e3ae35dd351 15-Apr-2008 Keith Whitwell <keith@tungstengraphics.com> translate: typo in emit_B8G8R8A8_UNORM
ranslate_generic.c
c81bbab6f6c0413996799800cac6fb49a698e765 15-Apr-2008 Keith Whitwell <keith@tungstengraphics.com> gallium: add a generic vertex (or other) buffer translation module
akefile
Conscript
ranslate.h
ranslate_generic.c