History log of /external/mesa3d/src/gallium/drivers/r600/r600_shader.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
301c9b96f23b43bef25a6d8a6040f19ccb74891a 30-Jan-2017 Bartosz Tomczyk <bartosz.tomczyk86@gmail.com> r600: Fix stack overflow

Commit 7b5878ee0491e7a93914389a8369cd6752b9757d increased number of
outputs to 64, but left output array intact. This caused stack overflow
when number of outputs is bigger then 32. Found by ASAN.

Cc: "12.0 13.0 17.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit a41f2527ae8ae5432b99c88863fbdf2f0b5f04ad)
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
23ead4c7b22aaf60f1a902fbea268b57b88d3a78 19-Jan-2017 Nicolai Hähnle <nicolai.haehnle@amd.com> r600: implement DDIV

Tested-by: Glenn Kennard <glenn.kennard@gmail.com>
Tested-by: James Harvey <lothmordor@gmail.com>
Cc: 17.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit e4f8f9a638c1ffb9b76840b088290f11f0f91813)
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7856dfdbabbb08678471c89c0dbddd6e730499d1 19-Jan-2017 Nicolai Hähnle <nicolai.haehnle@amd.com> r600: factor out cayman_emit_unary_double_raw

We will use it for DDIV.

Tested-by: Glenn Kennard <glenn.kennard@gmail.com>
Tested-by: James Harvey <lothmordor@gmail.com>
Cc: 17.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 488560cfe6ee2206f7a7f894694ebc43b419be61)
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
41b93b1fe047ebdaae7cc4d644633412cee81c35 19-Jan-2017 Nicolai Hähnle <nicolai.haehnle@amd.com> r600: double multiply can handle only one multiply at a time

It seems clear that trying to multiply two pairs of doubles would result
in the temporary register getting overwritten by the second pair. So
make the code more explicit.

Tested-by: Glenn Kennard <glenn.kennard@gmail.com>
Tested-by: James Harvey <lothmordor@gmail.com>
Cc: 17.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 76b02d2fe1df5351f67f53d07b37952043f0a84c)
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d995115b1733ec14182e6bb4653b8f8389b87518 19-Dec-2016 Marek Olšák <marek.olsak@amd.com> gallium: remove TGSI_OPCODE_SUB

It's redundant with the source modifier.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a4ace98a9733b3e83d971f4871c2908749c0e5c8 19-Dec-2016 Marek Olšák <marek.olsak@amd.com> gallium: remove TGSI_OPCODE_ABS

It's redundant with the source modifier.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
29144d0f34d9325a3549e4ed0feecc0577c70358 24-Oct-2016 Marek Olšák <marek.olsak@amd.com> gallium/radeon: stop using PIPE_BIND_CUSTOM

it has no effect whatsoever

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5da24242b3a54f31da153d67d55cd0f8547582f9 03-Jan-2016 Glenn Kennard <glenn.kennard@gmail.com> r600g: Add support for PK2H/UP2H

Based off of Ilia's original patch, but with output values replicated so
that it matches the TGSI semantics.

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b1b7e921f82027228b8e6d3e1baa06f4c3508626 27-Aug-2016 Rhys Kidd <rhyskidd@gmail.com> r600g: Clean up defined magic numbers for TGSI opcodes

Small code clean up that removes magic numbers where a TGSI
opcode has been defined.

No functional change expected as each opcode is unsupported on
the respective hardware.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: James Harvey <lothmordor@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d4cb3ee95cfe8487d431f99ae9b9d5a904708fb3 27-Aug-2016 Rhys Kidd <rhyskidd@gmail.com> r600g: Avoid duplicated initialization of TGSI_OPCODE_DFMA

As reported by Clang, TGSI_OPCODE_DFMA (defined magic number 118) is
currently initialized twice for Cayman and Evergreen.

When Jan Vesely added double precision FMA opcode it did make sense
to locate it immediately after TGSI_OPCODE_DMAD, although this is
out of order.

This change cleans up the prior magic number definition and ensures
any later reordering of this struct will not create problems.

Prior change was:

commit 015e2e0fce3eea7884f8df275c2fadc35143a324
Author: Jan Vesely <jan.vesely@rutgers.edu>
Date: Sat Jul 2 16:14:54 2016 -0400

r600g: Add double precision FMA ops

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96782
Fixes: 54c4d525da7c7fc1e103d7a3e6db015abb132d5d ("r600g: Enable FMA on chips that support it")

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Tested-by: James Harvey <lothmordor@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: James Harvey <lothmordor@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8e68f35d3208b313a106853a85994792446d0b72 28-Jul-2016 Matt Turner <mattst88@gmail.com> r600g: Avoid aliasing violations.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
015e2e0fce3eea7884f8df275c2fadc35143a324 02-Jul-2016 Jan Vesely <jan.vesely@rutgers.edu> r600g: Add double precision FMA ops

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96782
Fixes: 54c4d525da7c7fc1e103d7a3e6db015abb132d5d ("r600g: Enable FMA on chips that support it")

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Tested-by: James Harvey <lothmordor@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d5383a7d3114aa5f81a704ff84f58de6b41f94bd 21-Jun-2016 Marek Olšák <marek.olsak@amd.com> gallium/radeon: use r600_resource_reference

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Vedran Miletić <vedran@miletic.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
54c4d525da7c7fc1e103d7a3e6db015abb132d5d 16-Jun-2016 Jan Vesely <jan.vesely@rutgers.edu> r600g: Enable FMA on chips that support it

v2: Merge with PIPE_SHADER_CAP_DOUBLES
Add CHIP_HEMLOCK

v3: only set the instruction on EG and CM

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
47b390fe45e5e6f982c60b58985892438959cd8e 17-May-2016 Jan Vesely <jano.vesely@gmail.com> Treewide: Remove Elements() macro

Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
fb5d38e21982e9eb3195c61d020c9772b73bdbcf 28-Mar-2016 Patrick Rudolph <siro@das-labor.org> r600g: fix and optimize tgsi_cmp when using ABS and NEG modifier

Some apps set NEG and ABS on the source param to test for zero.
Use ALU_OP3_CNDE insted of ALU_OP3_CNDGE and unset both modifiers.

It also removes the need for a MOV instruction, as ABS isn't
supported on op3.

Tested on AMD CAYMAN and AMD RV770.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
af249a7da9bf2621ab836d5074ef692677b11bbf 16-Apr-2016 Marek Olšák <marek.olsak@amd.com> gallium: use PIPE_SHADER_* everywhere, remove TGSI_PROCESSOR_*

Acked-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4e5dc69af158dd5eef73ad4fcd7990e49ec6ec57 11-Mar-2016 Marek Olšák <marek.olsak@amd.com> r600g: flatten if (1) statement after removal of TGSI->LLVM

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
20a09897a6c757a93cfb385ede7a7eb5e79cc18f 11-Mar-2016 Marek Olšák <marek.olsak@amd.com> r600g: remove TGSI->LLVM translation

It was useful for testing and as a prototype for radeonsi bringup,
but it's not used anymore and doesn't support OpenGL 3.3 even.

v2: try to fix OpenCL build

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8e2a8ec731975aaeaf2188274c3b0c49eed36593 05-Jan-2016 Edward O'Callaghan <eocallaghan@alterapraxis.com> gallium/drivers/r600: Use unsigned for loop index

Found-by: Coccinelle
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
bfabd5e74a8898a470c91924cbcf95e6876fbe95 05-Jan-2016 Edward O'Callaghan <eocallaghan@alterapraxis.com> gallium/drivers: Remove unnecessary semicolons

Found-by: Coccinelle
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
cd7f252b114b7771cde9bba698eddaa1b4b93ab4 27-Dec-2015 Marek Olšák <marek.olsak@amd.com> gallium/radeon: r600_can_dump_shader should get TGSI processor type directly

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
255ccd1e99e2eb8ad9ae001e3796afc344ca15c8 30-Dec-2015 Nicolai Hähnle <nicolai.haehnle@amd.com> gallium/radeon: pass pipe_debug_callback into radeon_llvm_compile (v2)

This will allow us to send shader debug info via the context's debug callback.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> (v1)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
cf811faeff1eaa1aef817ae45314cc3419c44222 07-Dec-2015 Marek Olšák <marek.olsak@amd.com> gallium/radeon: remove radeon_winsys_cs_handle

"radeon_winsys_cs_handle *cs_buf" is now equivalent to "pb_buffer *buf".

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b5b87c4ed1dfd58aec8905e0514c9ba92ba83e1d 10-Dec-2015 Marek Olšák <marek.olsak@amd.com> r600g: write all MRTs only if there is exactly one output (fixes a hang)

This fixes a hang in
piglit/arb_blend_func_extended-fbo-extended-blend-pattern_gles2 on REDWOOD.

Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5362e53a068d5718b303dfad88bb623df22662e1 11-Dec-2015 Dave Airlie <airlied@redhat.com> r600: add missing return value check.

Pointed out by coverity scan.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
cce3864046be104933fd4f1bb7a4b36092ff4925 07-Dec-2015 Dave Airlie <airlied@redhat.com> r600: handle geometry dynamic input array index

This fixes:
glsl-1.50/execution/geometry/dynamic_input_array_index.shader_test
my profanity.

We need to load the AR register with the value from the index reg

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
38542921c785efb37bae88db409d278990684fa4 07-Dec-2015 Dave Airlie <airlied@redhat.com> r600g: fix geom shader input indirect indexing.

This fixes:
gs-input-array-vec4-index-rd

The others run out of gprs unfortunately.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
e97ac006d77ccbc87a56e46e2f75da6511c9b9e5 07-Dec-2015 Dave Airlie <airlied@redhat.com> r600g: fix outputing to non-0 buffers for stream 0.

This fixes:
arb_transform_feedback3-ext_interleaved_two_bufs_gs
arb_transform_feedback3-ext_interleaved_two_bufs_gs_max
transform-feedback-builtins

If we are only emitting one ring, then emit all output
buffers on it.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6bf6bdbc2bbc14875fff725aad9b7ed6ccfeff64 07-Dec-2015 Dave Airlie <airlied@redhat.com> r600: fix regression introduced with ring emit changes.

This was adding one after a CUT which broke end primitive
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
22058f69fbeda77ccfc2175850bead95a9ef048f 30-Nov-2015 Edward O'Callaghan <eocallaghan@alterapraxis.com> r600: handle barrier opcode.

This handles the barrier opcode for EG/CM.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9662a43d23c0ae46b4294561476b57e22e76ae04 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600/shader: handle tess related system-values.

This adds handling for TESSINNER/TESSOUTER in the TES
where they need to be fetched from LDS,
and TESSCOORD which comes in via r0.

It also handle primitive ID and invocation ID.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
92fbf856f42b22f68f62c2516e0c6453c454cf05 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600/shader: allow multi-dimension arrays for tcs/tes inputs/outputs.

This just allows multi-dim arrays to be processed.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
30d56d1c00d392c2ac44ff7194d8b502ea56b6f2 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600/shader: handle TES exports and streamout

when tessellation is enabled the TES shader is responsible
for handling streamout and exports.

This adds the streamout and export workarounds to TES,
and also makes sure TES sets up spi_sid.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2239f3eaff5c72c4cb1d4a5be97feb4af3d08d25 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600/shader: emit tessellation factors to GDS at end of TCS.

When we are finished the shader, we read back all the tess factors
from LDS and write them to special global memory storage using
GDS instructions.

This also handles adding NOP when GDS or ENDLOOP end the TCS.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
cfc2818e2302aba4d4f4ac13edff7f2b10b6302a 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600/shader: handle TCS output writing.

TCS outputs whenever they are written in the shader,
need to be written to LDS not temporaries, this handles
this case. It also fixes up the case where the output
is a relative addressed output, so we don't try to apply
the relative address at the wrong time.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
892cc65fa3edf64e509d627439eacd75f00b532b 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600/shader: handle VS shader writing to the LDS outputs. (v1.1)

This writes the VS shaders outputs to the LDS memory in
the correct places.

v1.1: use 24-bit
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8b2024196ffbe1d608d00277c24f948abaf1f8df 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600/shader: handle fetching tcs/tes inputs and tcs outputs

This handles the logic for doing fetches from LDS for
TCS and TES. For TCS we need to fetch both inputs and outputs,
for TES only inputs need to be fetched.

v2: use 24-bit ops.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4477be2404c9e3bb14835afcb1516daa25b8bb08 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600/shader: add get_lds_offset0 helper

This retrievs the offset into the LDS for a patch or
non-patch variable, it takes the RelPatch channel
and a temporary register.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2a9639e41fdcecb489e39f739e4d42e6a78655f3 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600/shader: add function to get tess constants info

This function retrieves the tess input/output info
from the tess constant buffer that is bound to the shader.

This uses a vfetch to get the values into the shader.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0696ebc899d3aa125ae85b757c5fba137617ecaa 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600/shader: add utility functions to do single slot arithmatic

These utilities are to be used to do things like integer adds and
multiplies to be used in calculating the LDS offsets etc.

It handles CAYMAN MULLO differences as well.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d87f54f2254344a02a8f1b2e141c9894b3b74864 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600/shader: move get_temp and last_instruction helpers up

These are required for tess to be used earlier.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
839dae0dc0d92f47dddaf67964603f3c9c4a0ad7 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600: port over the get_lds_unique_index from radeonsi

On r600 this needs to subtract 9 due to texcoord interactions.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
bdf7dadda8815f00fd6eb3c418fd0f12df32826d 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600: disable SB for now on tess related shaders.

Note we have to disable on vertex shaders when we are
operating in tes mode.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8849867b8a85b387b0ee113013e18e8cff153bbb 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600: update correct hw shaders depending on configuration.

This updates the tess hw shaders from the sw ones routing
things correctly.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b1da110b71b20509e4689475e82e88750f69b8fc 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600: add shader key entries for tcs and tes.

with tessellation vs can now run on ls, and tes can
run on vs or es, tcs runs on hs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0e49151dcfe042d937e1ac3c6eab86bb0a68cf04 24-Feb-2015 Dave Airlie <airlied@redhat.com> r600: set mega fetch count to 16 for gs copy shader

Seems like MFC should be set for this shader.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4ebcf5194d98b47bd9e8a72b7418054708b14750 24-Feb-2015 Dave Airlie <airlied@redhat.com> r600: increment ring index after emit vertex not before.

The docs say we should send the emit after the ring writes,
so lets do that and not have an ALU in between.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
13b134a443744e0a1d25d37a1e819d6737aca4a2 24-Feb-2015 Dave Airlie <airlied@redhat.com> r600: add alu + cf nop to copy shader on r600

SB suggests we do this for r600, so lets do it,
for the copy shader.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4f347225752b48f3dc5a59a6be71fe78616252a7 24-Feb-2015 Dave Airlie <airlied@redhat.com> r600: workaround empty geom shader.

We need to emit at least one cut/emit in every
geometry shader, the easiest workaround it to
stick a single CUT at the top of each geom shader.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4d64459a92a4c1a64fb7051fd1320c14c1854dcb 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600/shader: split address get out to a function.

This will be used in the tess shaders.

Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d72299c5315b4c9ff40209a14543e3eae9308081 30-Nov-2015 Dave Airlie <airlied@redhat.com> r600: move per-type settings into a switch statement

This will allow adding tess stuff much cleaner later.

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
3f45d29fe435266b137e8007acebcda498690b27 17-Oct-2015 Glenn Kennard <glenn.kennard@gmail.com> r600g: Pass conservative depth parameters to hw

Supported on R700 and up.

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b3e793f2db0e294c2b18e030a45c6253f20a16a6 11-Nov-2015 Dave Airlie <airlied@redhat.com> Revert "r600g: Pass conservative depth parameters to hw"

This reverts commit a1fc78911e9a6439db94d6ae91d5672c76e5fb1c.

I pushed the wrong patch.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a1fc78911e9a6439db94d6ae91d5672c76e5fb1c 17-Oct-2015 Glenn Kennard <glenn.kennard@gmail.com> r600g: Pass conservative depth parameters to hw

Supported on R700 and up.

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
744cc036b9734da13be85183e668536a69b7d224 30-Oct-2015 Dave Airlie <airlied@redhat.com> r600: enable SB for geom shaders on pre-evergreen

I've checked with piglit and one tests fails, but it fails
on evergreen as well, so will get fixed later.

Otherwise SB seems to be working fine for geom shaders on my
rv635.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f75f21a24ae2dd83507f3d4d8007f0fcfe6db802 25-Oct-2015 Ivan Kalvachev <ikalvachev@gmail.com> r600g: Fix special negative immediate constants when using ABS modifier.

Some constants (like 1.0 and 0.5) could be inlined as immediate inputs
without using their literal value. The r600_bytecode_special_constants()
function emulates the negative of these constants by using NEG modifier.

However some shaders define -1.0 constant and want to use it as 1.0.
They do so by using ABS modifier. But r600_bytecode_special_constants()
set NEG in addition to ABS. Since NEG modifier have priority over ABS one,
we get -|1.0| as result, instead of |1.0|.

The patch simply prevents the additional switching of NEG when ABS is set.

[According to Ivan Kalvachev, this bug was fond via
https://github.com/iXit/Mesa-3D/issues/126 and
https://github.com/iXit/Mesa-3D/issues/127]

Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
CC: <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
1befb7ed9856381cbfe874f361fae73b8e331bb4 07-Oct-2015 Glenn Kennard <glenn.kennard@gmail.com> r600g/sb: SB support for UBO indexing

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
80c5062abfdef28e23615f44b214760449f6a582 21-Sep-2015 Glenn Kennard <glenn.kennard@gmail.com> r600g/sb: Support gs5 sampler indexing (v2)

[airlied: v2 cayman fixups]

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ec3fe42b3a7c8d8a33d66aa7e3a43330b9c3c926 11-Sep-2015 Ilia Mirkin <imirkin@alum.mit.edu> r600g: add support for TXQS tgsi opcode

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d2ca9afd5da2a0228bbf7a9af5a2bb94424441c9 11-Sep-2015 Glenn Kennard <glenn.kennard@gmail.com> r600g: Support I2D/U2D/D2I/D2U

Only for Cypress/Cayman/Aruba, older chips have only partial fp64 support.
Uses float intermediate values so only accurate for int24 range, which
matches what the blob does.

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f9caabe8f1bff86d19b53d9ecba5c72b238d9e23 11-Sep-2015 Dave Airlie <airlied@redhat.com> r600g: lower number of driver const buffers

I'm going to want a driver constant buffer for tess to coordinate
LDS storage, so before I go tackling that I decided to merge the
clip/samplepos and texture info buffers into one. So I can steal
the spare one.

This creates a single constant buffer between the two, with
clip/samplepos taking up a reserved 128 bytes at the start.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6d2ceb10cd63b89892131a27d238620f00922dfb 08-Sep-2015 Dave Airlie <airlied@redhat.com> r600: don't use shader key without verifying shader type (v2)

Since 7a32652231f96eac14c4bfce02afe77b4132fb77
r600: Turn 'r600_shader_key' struct into union

we were accessing key fields that might be aliased in the union
with other fields, so we should check what shader type we are
compiling for before using key values from it.

v1.1: make it compile
v2: have caffeine, make it work - we don't set type
until later, so don't reference it until we've set it.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5fa5a012b163bad80d01a65e2947510f15e1be6b 04-Sep-2015 Dave Airlie <airlied@redhat.com> r600: fix loop overrun in cayman_mul_double_instr

Coverity warned about this. Ilia pointed it out.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d2cab815b451d2ddc29cb332f96e79cdec25443d 12-Aug-2015 Glenn Kennard <glenn.kennard@gmail.com> r600g: Add doubles support for CYPRESS

This doesn't enable the support, just adds some of
the code, so we don't have to keep rebasing.

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
3be5ee1574e0a3494c0550f4b7ae09117855d749 20-Feb-2015 Dave Airlie <airlied@redhat.com> r600g: add doubles support for CAYMAN

Only a subset of AMD GPUs supported by r600g support doubles,
CAYMAN and CYPRESS are probably all we'll try and support, however
I don't have a CYPRESS so ignore that for now.

This disables SB support for doubles, as we think we need to
make the scheduler smarter to introduce delay slots.

[airlied: pushing this to avoid pain of rebasing, it mostly
works on cayman only so far, Glenn has some ideas about
delay slot issues we need to look into. turned off by
default for now]

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
3bfa345c1eb3b0ec008d29fc0c62fe941412e4c6 09-Jul-2015 Glenn Kennard <glenn.kennard@gmail.com> r600g: add multiple stream support for geom shaders

This patch is taken from work by Glenn and myself,
and I've spent some time making it all work here.

This adds support for the multiple streams part of
ARB_gpu_shader5 to r600g.

It doesn't enable ARB_gpu_shader5 yet.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d503bbbf3082b5b301019721466d6fd2b41da03a 09-Jul-2015 Dave Airlie <airlied@redhat.com> r600g: add support for streams to the assembler.

This just adds support to the assembler dumper and allows
stream instructions to be generated. Also fix up the stream
debugging to add stream info.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d351bab9c52e96026b2d49cdfd0dc68fdd9a499e 01-Sep-2015 Edward O'Callaghan <eocallaghan@alterapraxis.com> r600g: Simplify out a couple of unnecessary branches

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0d19dc302f21d00b88ccb7b70e5a110d17ea4fdf 29-Aug-2015 Edward O'Callaghan <eocallaghan@alterapraxis.com> r600g: Use TGSI parse results instead of manually exfiltrating

This makes better use of the work that the TGSI API has done for
us.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
3eed81a97b2fa1f98a2ae577b8b6e04cb144f31a 29-Aug-2015 Edward O'Callaghan <eocallaghan@alterapraxis.com> r600g: Set geometry properties in r600_create_shader_state()

The selector is shared by all shader variants, so the
individual shaders shouldn't change it. Use tgsi_shader_scan()
results to set geometry properties within a
r600_create_shader_state() call and treat said propertices in
the selector as read-only within r600_shader_from_tgsi().

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b4dee1b6360a91117c7a754ed70f359f6000a0de 29-Aug-2015 Edward O'Callaghan <eocallaghan@alterapraxis.com> r600g: Move geometry properties state from shader to selector

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7b6369eb69e688e5bf739dbe60452950a794f55d 29-Aug-2015 Edward O'Callaghan <eocallaghan@alterapraxis.com> r600g: Remove dead assigment to 'gs_input_prim' in shader state

Note that 'geometry shader properties' should be carried in the
selector state over the shader state in any case.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
50932268aad0cc21511f370793e77c76e038bd06 23-Aug-2015 Glenn Kennard <glenn.kennard@gmail.com> r600g: Fix assert in tgsi_cmp

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=91726

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7a32652231f96eac14c4bfce02afe77b4132fb77 19-Aug-2015 Edward O'Callaghan <eocallaghan@alterapraxis.com> r600: Turn 'r600_shader_key' struct into union

This struct was getting a bit crowded, following the lead of
radeonsi, mirror the idea of having sub-structures for each
shader type. Turning 'r600_shader_key' into an union saves
some trivial memory and CPU cycles for the shader keys.

[airlied: drop as_ls, and reorder so larger fields at start.]
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d4ad4c20617f45f71152e292ee39f020ef352bfd 02-Aug-2015 Marek Olšák <marek.olsak@amd.com> r600g: fix the CB_SHADER_MASK setup

This fixes the single-sample fast clear hang.

Cc: 10.6 <mesa-stable@lists.freedesktop.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9a4c57afe48c391bb335f74c88b447f83704b413 25-Jul-2015 Marek Olšák <marek.olsak@amd.com> gallium/radeon: remove unused variables and old comments

Reviewed-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2294ba9565fbae49f1fc77ca171e9d6aafa34005 09-Jul-2015 Dave Airlie <airlied@redhat.com> radeon: add support for streams to the common streamout code. (v2)

This adds to the common radeon streamout code, support
for multiple streams.

It updates radeonsi/r600 to set the enabled mask up.

v2: update for changes in previous patch.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
e70d0515603df081916f6f31bb9e0455298b10cc 09-Jul-2015 Dave Airlie <airlied@redhat.com> r600g: move sampler/ubo index registers before temp reg

temp_reg needs to be last, as we increment things
away from it, otherwise on cayman some tests were overwriting
the index regs.

Fixes 2 piglit with ARB_gpu_shader5 forced on cayman.

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2bf5a4211ef305d90ca6133ca09c3b79e6088d50 22-Jun-2015 Dave Airlie <airlied@redhat.com> r600g: ignore sampler views for now.

This fixes a regression in that r600 stopped working when
sampler views were pushed.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
790510808e614ee6c5f55ba773734838041902cb 05-Jun-2015 Marek Olšák <marek.olsak@amd.com> r600g: handle TGSI input/output array declarations correctly

Most of this code could be removed if r600g used tgsi_shader_info.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6aff87bb01d2bd583ac629d02ebf56ecbf86ec2c 26-May-2015 Marek Olšák <marek.olsak@amd.com> r600g: fix a coverity defect in streamout code

Reported by Ilia Mirkin.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f2947807c8c7eae4b98eb37263b8a1d9ebbcafb5 07-Apr-2015 Glenn Kennard <glenn.kennard@gmail.com> r600g/sb: Enable SB for geometry shaders

Add SV_GEOMETRY_EMIT special variable type to track the
implicit dependencies between CUT/EMIT_VERTEX/MEM_RING
instructions so GCM/scheduler doesn't reorder them.

Mark emit instructions as unkillable so DCE doesn't eat them.

Enable only for evergreen/cayman as there are a few
unexplained GS piglit regressions on R6xx/R7xx with SB
enabled otherwise.

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ad84689f737edefe549688f9b36d66027ca3fcb2 31-Mar-2015 Dave Airlie <airlied@redhat.com> r600g: fix op3 abs issue

This code to handle absolute values on op3 srcs was a bit too simple,
it really needs a temp reg per src, not one per channel, make it
easier and let sb clean up the mess.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89831

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
3f94a5afcbab5ebcc4229cb3c65140ad5b5dafca 16-Mar-2015 Emil Velikov <emil.l.velikov@gmail.com> r600g: constify r600_shader_tgsi_instruction lists.

Massive list of constant data. Annotate it as such.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
63cf2b4448f96c8b69c11dac14d8c55742dc6918 16-Mar-2015 Emil Velikov <emil.l.velikov@gmail.com> r600g: kill off r600_shader_tgsi_instruction::{tgsi_opcode,is_op3}

Both of which are no longer used. Use designated initializer to make
things obvious as people add/remove TGSI_OPCODEs.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5e68c6b32284a5d8d65cf87359f321fc135bdc1c 16-Mar-2015 Emil Velikov <emil.l.velikov@gmail.com> r600g: use the tgsi opcode from parse.FullToken.FullInstruction

... rather than the local one in inst_info->tgsi_opcode.

This will allow us to simplify struct r600_shader_tgsi_instruction.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
216543ea547dd0572d9f2f0364f7a239a5aeafe1 28-Feb-2015 Marek Olšák <marek.olsak@amd.com> gallium: add FMA and DFMA opcodes (v3)

Needed by ARB_gpu_shader5.

v2: select DMAD for FMA with double precision
v3: add and select DFMA

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d80701df8af4a5d74c4f4eb09a4b3cef6970104b 24-Feb-2015 Glenn Kennard <glenn.kennard@gmail.com> r600g: Implement GL_ARB_draw_indirect for EG/CM

Requires Evergreen/Cayman and radeon kernel module
2.41.0 or newer.

Expected piglit fails due to hardware limitations:
* arb_draw_indirect-draw-arrays-prim-restart
Restarts not applied for DrawArrays commands
* arb_draw_indirect-vertexid
Base vertex offset is not included in vertex id

Marek: bump vgt_state num_dw by 3 (= space needed for one register write)

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
acef65503e79ce61a16bdba92462f0ed8a7b52c2 28-Jan-2015 Xavier Bouchoux <xavierb@gmail.com> r600g: fix abs() support on ALU 3 source operands instructions

Since alu does not support abs() modifier on source operands, spill
and apply the modifiers to a temp register when needed.

Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
349df23eb0d119e3f22ff6149824497414f07505 27-Jan-2015 Dave Airlie <airlied@redhat.com> r600g: add support for primitive id without geom shader (v2)

GLSL 1.50 specifies a fragment shader may have a primitive id
input without a geometry shader present.

On r600 hw there is a special GS scenario for this, you have
to enable GS_SCENARIO_A and pass the primitive id through
the vertex shader which operates in GS_A mode.

This is a first pass attempt at this, and passes the piglit
tests that test for this.

v1.1: clean up debug print + no need to assign
key value to setup output.
v2: add r600 support

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0d4272cd8e7c45157140dc8e283707714a8238d5 09-Dec-2014 Dave Airlie <airlied@redhat.com> r600g: fix regression since UCMP change

Since d8da6deceadf5e48201d848b7061dad17a5b7cac where the
state tracker started using UCMP on cayman a number of tests
regressed.

this seems to be r600g is doing CNDGE_INT for UCMP which is >= 0,
we should be doing CNDE_INT with reverse arguments.

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
07ae69753c6818bcce5d4edaf2cca39c20e37f4c 23-Nov-2014 Dave Airlie <airlied@redhat.com> r600g: merge the TXQ and BUFFER constant buffers (v1.1)

We are using 1 more buffer than we have, although in the future the
driver should just end up using one buffer in total probably, this
is a good first step, it merges the txq cube array and buffer info
constants on r600 and evergreen.

This should in theory fix geom shader tests on r600.

v1.1: fix comments from Glenn.

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
365a4a3f9a80d1b7a6d030d2921578dfc5c899c6 12-Nov-2014 Eric Anholt <eric@anholt.net> gallium: Drop the unused CND opcode.

Nothing in the tree generates it.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
00f7002c5c45887b204a3f14b8e3b32472cc39bb 12-Nov-2014 Eric Anholt <eric@anholt.net> gallium: Drop unused BRA opcode.

Never generated, and implemented in only nvfx vertprog.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ecfe9e2ad2b5f178ef09420f8d95d49937137cd9 12-Nov-2014 Eric Anholt <eric@anholt.net> gallium: Drop the unused SFL/STR opcodes.

Nothing generated them.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
dc00b382b58bb3eb94ca393d32bd7eb3bb07d021 12-Nov-2014 Eric Anholt <eric@anholt.net> gallium: Drop the unused RFL opcode.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8c822b1e912de9af6bb16a052bf9f188c2f4a33f 12-Nov-2014 Eric Anholt <eric@anholt.net> gallium: Drop unused X2D opcode.

Nothing in the tree generates it.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ff886c49555c2033dd5fda50459cafaf16540f86 13-Nov-2014 Eric Anholt <eric@anholt.net> gallium: Drop the unused ARA opcode.

Nothing in the tree generated it.

v2: Only drop ARA, not ARR as well.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com> (v2)
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
de2f8d75db3dad3089c96b65223e47ad3986a25c 12-Nov-2014 Eric Anholt <eric@anholt.net> gallium: Drop the unused RCC opcode.

Nothing in the tree generated it.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d4864cdf15ccd30f0e82d07fd0e9db8a0c115cda 12-Nov-2014 Eric Anholt <eric@anholt.net> gallium: Drop the NRM and NRM4 opcodes.

They weren't generated in tree, and as far as I know all hardware had to
lower it to a DP, RSQ, MUL.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2f01cc8417243884ac4767b0e53a5df20db2dc96 12-Nov-2014 Eric Anholt <eric@anholt.net> r600: Drop the "/* gap */" notes.

These are obviously the gaps already, due to the bare numbers with
unsupported implementations.

This makes inserting new gaps less irritating.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c88385603ae8d983314b736a9459bbf7d002cf11 19-Nov-2014 Dave Airlie <airlied@redhat.com> r600g: do all CUBE ALU operations before gradient texture operations (v2.1)

This moves all the CUBE section above the gradients section,
so that the gradient emission happens on one block which
is what sb/hardware expect.

v2: avoid changes to bytecode by using spare temps
v2.1: shame gcc, oh the shame. (uninit var warnings)

Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
38ec1844193570486bf35e25a7a4339a00da127e 18-Nov-2014 Dave Airlie <airlied@redhat.com> r600: fix texture gradients instruction emission (v2)

The piglit tests were failing, and it appeared to be SB
optimising out things, but Glenn pointed out the gradients
are meant to be clause local, so we should emit the texture
instructions in the same clause. This moves things around
to always copy to a temp and then emit the texture clauses
for H/V.

v2: Glenn pointed out we could get another ALU fetch in
the wrong place, so load the src gpr earlier as well.

Fixes at least:
./bin/tex-miplevel-selection textureGrad 2D

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
1830138cc04a2948b4cbc24b04faac3f6e195992 18-Nov-2014 Dave Airlie <airlied@redhat.com> r600g: limit texture offset application to specific types (v2)

For 1D and 2D arrays we don't want the other coordinates being
offset and affecting where we sample. I wrote this patch 6 months
ago but lost it.

Fixes:
./bin/tex-miplevel-selection textureLodOffset 1DArray
./bin/tex-miplevel-selection textureLodOffset 2DArray
./bin/tex-miplevel-selection textureOffset 1DArray
./bin/tex-miplevel-selection textureOffset 1DArrayShadow
./bin/tex-miplevel-selection textureOffset 2DArray
./bin/tex-miplevel-selection textureOffset(bias) 1DArray
./bin/tex-miplevel-selection textureOffset(bias) 2DArray

v2: rewrite to handle more cases and be consistent with code
above.

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d4c342f67e128dd9c17e8ae48a44677baf546295 18-Nov-2014 Dave Airlie <airlied@redhat.com> r600g: geom shaders: always load texture src regs from inputs

Otherwise we seem to lose the split_gs_inputs and try and
pull from an uninitialised register.

fixes 9 texelFetch geom shader tests.

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
27e1e0e7108511b43d0f56f678c7201f39e2acc5 18-Nov-2014 Dave Airlie <airlied@redhat.com> r600g/cayman: fix texture gather tests

It appears on cayman the TG4 outputs were reordered.

This fixes a lot of piglit tests.

Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
70dac5fa442a8c0cc8dfa2d8879c5c3c3dd885e4 18-Nov-2014 Dave Airlie <airlied@redhat.com> r600g: cayman umad assigns dst pointlessly

There is no need to assign dst here, just use the chan from j

Pointed out by glennk.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4a128d5a16a575faaac969468a3aaafce48504cf 18-Nov-2014 Dave Airlie <airlied@redhat.com> r600g/cayman: fix integer multiplication output overwrite (v2)

This fixes tests/spec/glsl-1.10/execution/fs-op-assign-mult-ivec2-ivec2-overwrite.shader_test.

hopeful fix for fd.o bug 85376

Reported-by: ghallberg
Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7b1c0cbc90d456384b0950ad21faa3c61a6b43ff 15-Oct-2014 Glenn Kennard <glenn.kennard@gmail.com> r600g: Implement sm5 UBO/sampler indexing

Caveat: Shaders using UBO/sampler indexing will
not be optimized by SB, due to SB not currently
supporting the necessary CF_INDEX_[01] index
registers.

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
444c8c2f287d6553b7d9c5cdf721dcb7624e01a9 15-Oct-2014 Glenn Kennard <glenn.kennard@gmail.com> r600g: Implement sm5 interpolation functions

Requires evergreen/cayman

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a327fa3a068af49bb7ae00a4b03abcb91906e0d2 10-Sep-2014 Glenn Kennard <glenn.kennard@gmail.com> r600g: Implement GL_ARB_sample_shading

Also fixes two sided lighting which was broken at least
on pre-evergreen by commit b1eb00.

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8d0f6ff810e9bc16ef7c2fd8d5a34d12f2643f91 25-Aug-2014 Glenn Kennard <glenn.kennard@gmail.com> r600g: Implement sm5 geometry shader instancing

Requires Evergreen or later hardware.

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
afa7df9b78c0e7b14d2069faa8bc83aa2548b8e5 15-Aug-2014 Glenn Kennard <glenn.kennard@gmail.com> r600g: Implement ARB_derivative_control

Requires Evergreen/Cayman

marek: update release notes

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
da9c3ed304be5d08ff989d61c6e2d1be8a845767 10-Aug-2014 Marek Olšák <marek.olsak@amd.com> r600g: fix constant buffer fetches

Somebody forgot to do this. It was uncovered by recent st/mesa changes.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82139

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
3a9278b92cb5595d1dae604c409abe8f1a9be5b3 20-Jul-2014 Glenn Kennard <glenn.kennard@gmail.com> r600g: Implement gpu_shader5 textureGather

Adds 0-3 textureGather component selection and non-constant offsets

Caveat: 0 and 1 texture swizzles only work if textureGather component
select is 3 or a component that does not exist in the sampler texture
format. This is a hardware limitation, any other value returns
128/255=0.501961 for both 0 and 1.

Passes all textureGather piglit tests on radeon 6670, except for those
using 0/1 texture swizzles due to aforementioned reason.

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b1eb00cd4008e9529f3cbdf0ce8a58aa68e75793 23-Jul-2014 Glenn Kennard <glenn.kennard@gmail.com> r600g: gpu_shader5 gl_SampleMaskIn support

Map TGSI_SEMANTIC_SAMPLEMASK to register/component.
Enable face register when sample mask is needed by shader.
Requires Evergreen/Cayman

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2768a56f5851c7c2f611ca2a9fb12ad010b608d7 23-Jul-2014 Glenn Kennard <glenn.kennard@gmail.com> r600g: Implement gpu_shader5 integer ops

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2133a1aedf23c8d88a35b9ca2f30719a68705504 23-Jul-2014 Glenn Kennard <glenn.kennard@gmail.com> r600g: Add IMUL_HI/UMUL_HI support

Fixes fs-imulExtended, fs-imulExtended-only-msb, fs-umulExtended,
fs-umulExtended-only-msb piglit tests.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a48b615006942f92243fd7783f5ef9cf396be1d0 23-Jul-2014 Glenn Kennard <glenn.kennard@gmail.com> r600g: Implement GL_ARB_texture_query_lod

Requires Evergreen or later

v2 (Andreas): Update relnotes/10.3

Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d5bcb5e8dea3dc949ff6b093af7f46585b94b63e 23-Jul-2014 Marek Olšák <marek.olsak@amd.com> r600g: switch SNORM conversion to DX and GLES behavior

it also matches GL 4.2

further discussion:
http://lists.freedesktop.org/archives/mesa-dev/2013-August/042680.html

Cc: mesa-stable@lists.freedesktop.org
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2fa6d659c3b3e95686f048c4b93d94b1e4814493 18-Jul-2014 Glenn Kennard <glenn.kennard@gmail.com> r600g: Use hardware sqrt instruction

Piglit quick tests including sqrt pass, no other regressions,
tested on radeon 6670.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
392c9f8dfe11034c44aeec72217e6f12dce20490 16-Jul-2014 Glenn Kennard <glenn.kennard@gmail.com> r600g: Implement GL_ARB_texture_gather

Only supported on evergreen and later. Currently limited
to single component textures as the hardware GATHER4
instruction ignores texture swizzles.

Piglit quick run passes on radeon 6670 with all
applicable textureGather tests, no regressions.

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4c97ed4411e3653a082875b79587fb308c284a99 02-Jul-2014 Ilia Mirkin <imirkin@alum.mit.edu> gallium: switch dedicated centroid field to interpolation location

The new location field can be either center, centroid, or sample, which
indicates the location that the shader should interpolate at.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
313acb3ffa2e73635807c4028b7aedced5bad379 02-Jul-2014 Ilia Mirkin <imirkin@alum.mit.edu> r600g: allow vs to write to gl_ViewportIndex

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Tobias Droste <tdroste@gmx.de>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
141f8fe1d100f66afe5217a8a33c17fce11ee8a8 25-Jun-2014 Ilia Mirkin <imirkin@alum.mit.edu> r600g: allow viewport index/layer to be sent to ps

In order to support ARB_fragment_layer_viewport, we need to explicitly
send these along to the pixel shader, since it has no other way to
retrieve them.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Tobias Droste <tdroste@gmx.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b206f5951cb8639041a27bfc35cd6add1127ba05 17-May-2014 Christoph Bumiller <e0425955@student.tuwien.ac.at> r600g: use TGSI_PROPERTY to disable viewport and clipping

v2 get rid of magic value, use DEFINES
v3 update clip_disable together with vs_position_window_space

Big thanks to Marek Olšák!

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
476aaf8b8ee77d84c295e1429035e92ecf3a7349 17-May-2014 Christoph Bumiller <christoph.bumiller@speed.at> r600g: HW bug workaround for TGSI_OPCODE_BREAKC

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6544a4a3425ffab6004918ee1299d4e63ed71755 17-May-2014 Christoph Bumiller <christoph.bumiller@speed.at> r600g: implement TGSI_OPCODE_BREAKC

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
822ac968024b1f1aacb729e25b811908237e3beb 17-May-2014 Christoph Bumiller <christoph.bumiller@speed.at> r600g: support all channels of TGSI_FILE_ADDRESS

It's allowed in SM3.

v2: fix multi-component tgsi_r600_arl (FLT_TO_INT is trans-only)

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7286739b9beea4683a29fe91850688a07ce23e1a 16-Apr-2014 Michel Dänzer <michel.daenzer@amd.com> r600g: Disable LLVM by default at runtime for graphics

For graphics, the LLVM compiler backend currently has many shortcomings
compared to the non-LLVM one. E.g. it can't handle geometry shaders yet,
but that's just the tip of the iceberg.

So building Mesa with --enable-r600-llvm-compiler is currently not
recommended for anyone who doesn't want to work on fixing those issues.
However, for protection of users who end up enabling it anyway for some
reason, let's disable the LLVM backend at runtime by default. It can be
enabled with the environment variable R600_DEBUG=llvm.

Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ee2bcf38a4c8930d8f9cecfac580030a45c41dae 09-Apr-2014 Michel Dänzer <michel.daenzer@amd.com> r600g: Don't leak bytecode on shader compile failure

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74868

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9c2a3934c5e039d996c721478eeb1fa3f956904e 10-Mar-2014 Marek Olšák <marek.olsak@amd.com> r600g: document why texture offset emulation is needed
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8a08051e2a7227061300e344a4e41a1cdf2d6145 03-Mar-2014 Marek Olšák <marek.olsak@amd.com> r600g: fix texelFetchOffset GLSL functions

Cc: mesa-stable@lists.freedesktop.org
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
1337da51152db7fa1a71ac86b61b51a42d29d595 03-Mar-2014 Marek Olšák <marek.olsak@amd.com> r600g: implement edge flags

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8f3bcedde216e79be3f7bf9ac2e73dd5188240ee 20-Feb-2014 Tom Stellard <thomas.stellard@amd.com> r600g: Use util_cpu_to_le32() instead of bswap32() on big-endian systems

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6d434252e239bc872549e59c64eb3d0e5dab0655 31-Jan-2014 Dave Airlie <airlied@redhat.com> r600g: add support for multiple viewports.

tested on rv635 and barts.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
79ea0f4506995c010320d56cd9dbfbefa34ab6f2 30-Jan-2014 Dave Airlie <airlied@redhat.com> r600g: add support for geom shaders to r600/r700 chipsets (v2)

This is my first attempt at enabling r600/r700 geometry shaders,
the basic tests pass on both my rv770 and my rv635,

It requires this kernel patch:
http://www.spinics.net/lists/dri-devel/msg52745.html

v2: address Alex comments.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c6cfc54db059310c41d139c4d01929928d031b55 04-Feb-2014 Dave Airlie <airlied@redhat.com> r600g: properly propogate clip dist write value

This moves the value from the GS shader to the copy shader so the registers
are setup correctly.

fixes tests/spec/glsl-1.50/execution/geometry/clip-distance-out-values.shader_test

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b209afb153c39be1693879ce9666ca18f12b6a37 03-Feb-2014 Dave Airlie <airlied@redhat.com> r600g: calculate a better value for array_size (v2)

attempt to calculate a better value for array size to avoid breaking apps.

v2: use 0xfff like streamout, suggested by Grigori

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ce9e939144aa2c711718dce42477858e13f6b264 31-Jan-2014 Dave Airlie <airlied@redhat.com> r600g: fix CAYMAN geometry shader support

cayman has a different end of program bit, so do that properly.

fixes hangs with geom shader tests on cayman.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7ec5e883f20a7ed88c23a98c4be8d4a4ea06e81e 29-Jan-2014 Dave Airlie <airlied@redhat.com> r600g: fix up shader out misc stuff for copy shader

set the correct values so the misc out register is setup correctly
for the copy shader.

This also updates the state for the gs copy shader so the hw
gets programmed correctly.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f89394be986843a65150ae9bef761b73e58fd1ba 28-Jan-2014 Dave Airlie <airlied@redhat.com> r600g: initial VS output layer support

This just adds support for emitting the proper value in the VS out misc.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0d79d5da40fcf0c7233dec4d9ac4ce66b9942147 24-Jan-2014 Dave Airlie <airlied@redhat.com> r600g: fix dynamic_input_array_index.shader_test

This follows what fglrx does, it unpacks the input we are
going to indirect into a bunch of registers and indirects
inside them.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
e12147e9f608b8117e653152317c6c64ea004b71 24-Jan-2014 Dave Airlie <airlied@redhat.com> r600g: add support for indirect geom ring writes

We need to be able to write to the ring using a base register
for when we emit vertices in a loop, in theory the SB compiler
could collapse these indirect writes to direct writes if the
register value is constant and known, but that is outside my
pay grade.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f4652babbde7bd9a7660ece7fe38ed16e294595e 23-Dec-2013 Dave Airlie <airlied@redhat.com> r600g: add primitive input support for gs

only enable prim id if gs uses it

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b0e842bd9f90d6b77eae085a168d5a6c49962bf3 19-Dec-2013 Dave Airlie <airlied@redhat.com> r600g: emit streamout from dma copy shader

This enables streamout with GS in the mix, from the
VS dma shader.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
20adc7449cc4abe2caf6d78d2c62cc0e6e86b87c 18-Dec-2013 Dave Airlie <airlied@redhat.com> r600g/gs: fix cases where number of gs inputs != number of gs outputs

this fixes a bunch of the geom shader built-in tests

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
defebc0293a660155ef3027ee8cc65319379b2ed 28-Jan-2014 Dave Airlie <airlied@redhat.com> r600g: increase array base for exported parameters

Trivial fix to Vadim's code.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
461c463bb2cf324f34bf76562f9942ceb1d69dec 30-Nov-2013 Dave Airlie <airlied@redhat.com> r600g: emit NOPs at end of shaders in more cases

If the shader has no CF clauses at all emit an nop
If the last instruction is an ENDLOOP add a NOP for the LOOP to go to
if the last instruction is CALL_FS add a NOP

These fix a bunch of hangs in the geometry shader tests.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c4782a58c30473e5f67c7361c6c57160f940a978 29-Nov-2013 Dave Airlie <airlied@redhat.com> r600g: don't enable SB for geom shaders

SB needs fixes for three GS instructions it seems to raise
them outside loops etc despite my best efforts.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
eeead9b8ed77804f228bd9ba434e26b5c12d73ed 29-Jan-2014 Dave Airlie <airlied@redhat.com> r600g: don't fail if we can't map VS->GS ring entries

This can happen in normal operation, so don't report an error on it,
just continue.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
1371d65a7fbd695d3516861fe733685569d890d0 02-Aug-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g: initial support for geometry shaders on evergreen (v2)

This is Vadim's initial work with a few regression fixes squashed in.

v2: (airlied)
fix regression in glsl-max-varyings - need to use vs and ps_dirty
fix regression in shader exports from rebasing.
whitespace fixing.
v2.1: squash fix assert

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
552aae7e47e93ada58649a92ae9e7da37afb05c3 31-Jul-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g: move barrier and end_of_program bits from output to cf struct (v2)

v2: fix regression on r600 NOP instructions.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
29a43cb0b622d8e40362b386a85c33bdd1a9bb54 29-Jan-2014 Dave Airlie <airlied@redhat.com> r600g: split streamout emit code into a separate function

For geometry shaders we need to call this code from a second place.

Just move it out for now to keep future patches cleaner.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
88c8f1972976c506e8fb048100ed11fef1ca938b 30-Oct-2013 Vincent Lejeune <vljn@ovi.com> r600/llvm: Store inputs in function arguments
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
10ddeb910ba8386a6b46396d827aed4116091b0b 10-Oct-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g: fix tgsi_op2_s with trans-only instructions

This fixes the issue when dst and src is the same reg and operation on one
channel overwrites the source for other channels, e.g.:

UMUL TEMP[2].xyz, TEMP[0].xyzz, TEMP[2].xxxx

In this example the result of the operation on channel x is written in
TEMP[2].x and then used as a second source operand for channels y and z
instead of original value in TEMP[2].x.

This patch stores the results in temp reg and moves them to
dst after performing operation on all channels.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=70327

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8419c5c3ce1489222268bf840c1d165ea8bc53ce 03-Oct-2013 Grigori Goronzy <greg@chown.ath.cx> r600g: texture offsets for non-TXF instructions

All texture instructions can use offsets, not just TXF. Offsets into
the literals array were wrong, too.

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4e4c32ba11598818583ad0aa689339297ddf1c74 25-Sep-2013 Vincent Lejeune <vljn@ovi.com> r600/llvm: Adds support for MSAA
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9f183eb7deb2bd40e9717deb723e4976f443fb88 21-May-2013 Vincent Lejeune <vljn@ovi.com> r600g/llvm: fix txq for texture buffer
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ef6680d3eee621bbb207ca0eda2e142bcc099ed3 23-Sep-2013 Marek Olšák <marek.olsak@amd.com> r600g: move the low-level buffer functions for multiple rings to drivers/radeon

Also slightly optimize r600_buffer_map_sync_with_rings.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0cb9de1dd078395d541c32c0de81ea4f05147baa 22-Sep-2013 Marek Olšák <marek.olsak@amd.com> radeonsi: move debug options to R600_DEBUG
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ba650ccf91a103d90d45b5927a8a9220e222cfc5 22-Sep-2013 Marek Olšák <marek.olsak@amd.com> r600g: move some debug options to drivers/radeon
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d5b23dfc1c07f98afe749053b9cb4b69829fe3d4 13-Aug-2013 Marek Olšák <marek.olsak@amd.com> r600g: move streamout state to drivers/radeon

This streamout state code will be used by radeonsi.

There are new structures r600_common_context and r600_common_screen.
What is inherited by what is shown here:

pipe_context -> r600_common_context -> r600_context
pipe_screen -> r600_common_screen -> r600_screen

The common structures reside in drivers/radeon. Currently they only contain
enough functionality to be able to handle streamout. Eventually I'd like
the whole pipe_screen implementation to be shared and some of the context
stuff too.

This is quite big, but most changes are because of the new structures and
the fact r600_write_value is replaced by radeon_emit.

Thanks to Tom Stellard for fixing the build for r600g/compute.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f7217b99f243738f941a5d009c68387dfadcb50a 23-Aug-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g: enable SB backend by default

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
29ff2e907d6c54f95be6dfa72201fd25bbd50fcd 25-Aug-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g: fix color exports when we have no CBs

We need to export at least one color if the shader writes it,
even when nr_cbufs==0.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b5ddaf9975f96c46ea3dfb02c4130de5196b238c 24-Aug-2013 Henri Verbeet <hverbeet@gmail.com> r600g: Implement the new float comparison instructions for Cayman as well.

I assume this should have been part of commit
7727fbb7c5d64348994bce6682e681d6181a91e9. This (obviously) fixes a lot tests.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7727fbb7c5d64348994bce6682e681d6181a91e9 13-Aug-2013 Roland Scheidegger <sroland@vmware.com> r600/radeonsi: implement new float comparison instructions

Also use ordered comparisons for old cmp instructions.

Tested-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Tom Stellard <tom@stellard.net>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
957a2014f9f3f9d7c3e53642dafcdc529eb0a466 01-Aug-2013 Christoph Bumiller <e0425955@student.tuwien.ac.at> r600g: honour semantic index in fragment color exports

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
46205ab8cc03cbda6bbc0c958e277f972973ebfe 12-Jul-2013 Brian Paul <brianp@vmware.com> tgsi: rename the TGSI fragment kill opcodes

TGSI_OPCODE_KIL and KILP had confusing names. The former was conditional
kill (if any src component < 0). The later was unconditional kill.
At one time KILP was supposed to work with NV-style condition
codes/predicates but we never had that in TGSI.

This patch renames both opcodes:
TGSI_OPCODE_KIL -> KILL_IF (kill if src.xyzw < 0)
TGSI_OPCODE_KILP -> KILL (unconditional kill)

Note: I didn't just transpose the opcode names to help ensure that I
didn't miss updating any code anywhere.

I believe I've updated all the relevant code and comments but I'm
not 100% sure that some drivers had this right in the first place.
For example, the radeon driver might have llvm.AMDGPU.kill and
llvm.AMDGPU.kilp mixed up. Driver authors should review their code.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2639fca1f017907af7ce446fba60b520aa376abc 12-Jun-2013 Tom Stellard <thomas.stellard@amd.com> r600g/compute: Move compute_shader_create() function into evergreen_compute.c

Tested-by: Aaron Watry <awatry@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ebd68dd02998a8595cb10844c37a6b02dc3078a8 16-Jun-2013 Jonathan Gray <jsg@jsg.id.au> gallium: replace bswap_32 calls with util_bswap32

byteswap.h and bswap_32 aren't portable, replace them with calls to
gallium's util_bswap32 as suggested by Mark Kettenis. Lets these files
build on OpenBSD.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
32c9cbb38fc03d028500b1904ff4d66a07e9471e 18-May-2013 Vincent Lejeune <vljn@ovi.com> r600g/llvm: Fix cubearray textureSize
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7e17e72cb716c56264d4778684f6f23de69a56a1 16-May-2013 Niels Ole Salscheider <niels_ole@salscheider-online.de> r600g: fixup for MSAA texture support checking

Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5a3fac4d2667b5d46058564151142fec158f5f82 11-Apr-2013 Marek Olšák <maraeo@gmail.com> r600g: cleanup MSAA texture support checking

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
da33f9b919039442e9ab51f9b1d1c83a73607133 02-May-2013 Marek Olšák <maraeo@gmail.com> r600g: increase array size for shader inputs and outputs

and add assertions to prevent buffer overflow. This fixes corruption
of the r600_shader struct.

NOTE: This is a candidate for the stable branches.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
df27320560cfef439aa299dcea12b900195294c3 03-May-2013 Tom Stellard <thomas.stellard@amd.com> r600g/llvm: Don't feed LLVM output through r600_bytecode_build()

The LLVM backend emits raw ISA now, so we can just its output
unmodified.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
e917ed96ae38fc382bac50a6536d761b829ac8cd 03-May-2013 Tom Stellard <thomas.stellard@amd.com> r600g/llvm: Don't emit CALL_FS for vertex shaders

The LLVM backend takes care of this now.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a6fe055fa77e42e35f25272bdd5ca7213b436a1a 01-May-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g/sb: use hex instead of binary constants

This should fix build issues with GCC < 4.3

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4ca67dbf0cc4cd509c225c5feb5e45387739a48b 02-May-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g: use old shader disassembler by default

New disassembler is not completely isolated yet from further processing
in r600g/sb that is not required for printing the dump, so it has higher
probability to fail in case of any unexpected features in the bytecode.

This patch adds "sbdisasm" flag for R600_DEBUG that allows to use new
disassembler in r600g/sb for shader dumps when shader optimization
is not enabled.

If shader optimization is enabled, new disassembler is used by default.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ad1df471d083630106da8c39ec076f49e779e965 30-Apr-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g: plug in optimizing backend

Optimization is enabled with "R600_DEBUG=sb".

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7d555f2f4ce8be3c53bcc914620bcefc22c05cb5 25-Apr-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g: mask unused source components for SAMPLE

This results in more clean shader code and may improve the quality of
optimized code produced by r600-sb due to eliminated false dependencies
in some cases.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a6a4b70e2dc11132fbb29ef5e47c26e680c4e885 30-Apr-2013 Vincent Lejeune <vljn@ovi.com> r600g/llvm: Fix opencl build
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
51e9bfdc48b6d73aa0fa0a8f7911863b5968bdb9 28-Apr-2013 Vincent Lejeune <vljn@ovi.com> r600g/llvm: get use_kill from compiler shader
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f64058803ad43e360ffaa5f14763485f4cac0158 24-Apr-2013 Tom Stellard <thomas.stellard@amd.com> r600g/llvm: Pass struct r600_bytecode to r600_llvm_compile

This way we don't need to update the function signature everytime we
emit a new config value. This also fixes the build with
--enable-opencl.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
edd90a19ca2a13b8694f2560e77c9f02446cfaa7 19-Apr-2013 Vincent Lejeune <vljn@ovi.com> r600/llvm: Read stacksize from config header
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a7f73f5155d1b36bf493a70639ca9bcb023beba3 13-Apr-2013 Vincent Lejeune <vljn@ovi.com> /bin/bash: q : commande introuvable
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
3b20170b2fb74a45031bf1e41d5149d2b3d4f2bf 18-Apr-2013 Tom Stellard <thomas.stellard@amd.com> r600g: Fix build with --enable-opencl
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2b9ed257c0c4db879970afb2c5981c59ca70c21b 13-Apr-2013 Vincent Lejeune <vljn@ovi.com> r600g/llvm: Use gprcount from llvm
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
50b3fc6204a28881f625605f988cb0866ae6a6a5 17-Apr-2013 José Fonseca <jfonseca@vmware.com> gallium: Disambiguate TGSI_OPCODE_IF.

TGSI_OPCODE_IF condition had two possible interpretations:

- src.x != 0.0f

- Mesa statetracker when PIPE_SHADER_CAP_INTEGERS was false either for
vertex and fragment shaders
- gallivm/llvmpipe
- postprocess
- vl state tracker
- vega state tracker
- most old drivers
- old internal state trackers
- many graw examples

- src.x != 0U

- Mesa statetracker when PIPE_SHADER_CAP_INTEGERS was true for both
vertex and fragment shaders
- tgsi_exec/softpipe
- r600
- radeonsi
- nv50

And drivers that use draw module also were a mess (because Mesa would
emit float IFs, but draw module supports native integers so it would
interpret IF arg as integers...)

This sort of works if the source argument is limited to float +0.0f or
+1.0f, integer 0, but would fail if source is float -0.0f, or integer in
the float NaN range. It could also fail if source is integer 1, and
hardware flushes denormalized numbers to zero.

But with this change there are now two opcodes, IF and UIF, with clear
meaning.

Drivers that do not support native integers do not need to worry about
UIF. However, for backwards compatibility with old state trackers and
examples, it is advisable that native integer capable drivers also
support the float IF opcode.

I tried to implement this for r600 and radeonsi based on the surrounding
code. I couldn't do this for nouveau, so I just shunted IF/UIF
together, which matches the current behavior.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>

v2:
- Incorporate Roland's feedback.
- Fix r600_shader.c merge conflict.
- Fix typo in radeon, spotted by Michel Dänzer.
- Incorporte Christoph Bumiller's patch to handle TGSI_OPCODE_IF(float)
properly in nv50/ir.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f61b7da80e238892b0832ec12b11589fba946b47 13-Apr-2013 José Fonseca <jfonseca@vmware.com> gallium: Eliminate TGSI_OPCODE_IFC.

Never used or implemented.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4c3ed795662974a1c2ad2326fc74bef608a34f31 16-Apr-2013 Martin Andersson <g02maran@gmail.com> r600g: Workaround for a harware bug with nested loops on Cayman

There is a hardware bug on Cayman where a BREAK/CONTINUE followed by
LOOP_STARTxxx for nested loops may put the branch stack into a state
such that ALU_PUSH_BEFORE doesn't work as expected. Workaround this
by replacing the ALU_PUSH_BEFORE with a PUSH + ALU

Fixes piglit tests EXT_transform_feedback/order*

v2: Use existing loop count and improve comment
v3: [Vadim Girlin] Set jump address for PUSH instructions

NOTE: This is a candidate for the 9.1 branch

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
184278a804bb92b998b46c1f8db8b516cd7dcf21 11-Apr-2013 Dave Airlie <airlied@redhat.com> r600g: fix two issues in compressed msaa reading code

I've no idea when sample_chan would ever be 4 here, but 4 is most
definitely wrong, array textures have it as 3 as well.

Also the cayman code though unused is obviously wrong.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a8246927e35a49097f70cffb7fa8dd05ec1365e1 02-Apr-2013 Martin Andersson <g02maran@gmail.com> r600g: Fix UMAD on Cayman

The multiplication part of tgsi_umad did not work on Cayman, because it did
not populate the correct vector slots.

This fixed hardlocks in the EXT_transform_feedback/order tests.

NOTE: This is a candidate for the stable branches.
(might not be easy to cherry-pick though)

Signed-off-by: Marek Olšák <maraeo@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
92769612233dade9b7d45d5058dc86efc18d7710 03-Apr-2013 Vincent Lejeune <vljn@ovi.com> r600g/llvm: Workaround for wrong tex.offset_*
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
097a6ecdfe592fdf2c5f3b48a17da6507eaa405c 02-Apr-2013 Vincent Lejeune <vljn@ovi.com> r600g/llvm: Do not change cf_alu inst when adding alus
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9be624b3ef32ae6311010cf05531e12051b647dc 02-Apr-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g: don't reserve more stack space than required v5

Reduced stack size allows to run more threads in some cases,
improving performance for the shaders that use stack (that is, for the
shaders with control flow instructions). E.g. with unigine-based apps.

v4: implement exact computation taking into account wavefront size
v5: add cases for RV620, RS880

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7e04227f3967fd4c4dd7a088cb42197d916925a5 02-Apr-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g: fix range handling for tgsi input declarations v2

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8c8c4e3977e3126d8bb23d1e30e27d869e32c89f 30-Mar-2013 Vincent Lejeune <vljn@ovi.com> r600g/llvm: Use stack_size provided from llvm.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
af38695f5105a2f766f3df393c3e42067c3706f2 26-Mar-2013 Vincent Lejeune <vljn@ovi.com> r600g/llvm: Add support for cf_alu native encode
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
67a8ee7aaaef00ac2b2d513a1afc49fab6eeb3d3 26-Mar-2013 Vincent Lejeune <vljn@ovi.com> r600g/llvm: use native encode for tex
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a0676968b958ee5bb6270b34485a1c84764028cf 11-Mar-2013 Tom Stellard <thomas.stellard@amd.com> r600g/llvm: Fix build
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
63042af933eb97930077ad57b047ffa7abb0f6e0 28-Feb-2013 Marek Olšák <maraeo@gmail.com> r600g: atomize vertex shader

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
167263ecb17264fce3d17f516e6234fc87bd6029 01-Mar-2013 Marek Olšák <maraeo@gmail.com> r600g: inline r600_pipe_shader function

also change names of other functions, so that they make sense

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4bf0ebdd4fc8dbcab9333ff8805af35a91e6848b 01-Mar-2013 Marek Olšák <maraeo@gmail.com> r600g: use a single env var R600_DEBUG, disable bytecode dumping

Only the disassembler is used to dump shaders. Here's a few examples
how to use R600_DEBUG.

Log compute info:
R600_DEBUG=compute

Dump all shaders:
R600_DEBUG=fs,vs,gs,ps,cs

Dump pixel shaders only:
R600_DEBUG=ps

Disable Hyper-Z:
R600_DEBUG=nohyperz

Disable the LLVM backend:
R600_DEBUG=nollvm

Or use any combination of the above, or print all options:
R600_DEBUG=help

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
90e6f47ac8c8fdbfd097ef099895cd2ae005eb55 13-Feb-2013 Vincent Lejeune <vljn@ovi.com> r600g/llvm: Fix alpha_to_one piglit tests

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8aaee4d64e362137fabfe536a686638a6cc882bc 04-Feb-2013 Tom Stellard <thomas.stellard@amd.com> r600g/compute: Fix segfault caused by new shader disassembler
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
e42111ecbaca8b6dab3c8a7a8cbc295bb6b404eb 01-Feb-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g: implement shader disassembler v3

R600_DUMP_SHADERS environment var now allows to choose dump method:
0 (default) - no dump
1 - full dump (old dump)
2 - disassemble
3 - both

v2: fix output for burst_count > 1
v3: use more human-readable output for kcache data in CF_ALU_xxx clauses,
improve output for ALU_EXTENDED, other minor fixes

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
022122ee63b8a00afc23eaa347df934a79fb1d4c 01-Feb-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g: use tables with ISA info v3

v3: added some flags including condition codes for ALU,
fixed issue with CF reverse lookup (overlapping ranges of CF_ALU_xxx
and other CF instructions)
rebased on current master

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c9343047cfc44039915e0b09fc94bd992559a982 23-Jan-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g: improve inputs/interpolation handling with llvm backend

Get rid of special handling for reserved regs.
Use one intrinsic for all kinds of interpolation.

v2[Vincent Lejeune]: Rebased against current master

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
33dc412b8901ec6b693644a40b1cd62a2cde2e99 22-Jan-2013 Tom Stellard <thomas.stellard@amd.com> r600g: Add ar_chan member to struct r600_bytecode

r600_bytecode::ar_chan stores the register channel for the value that
will be loaded into the AR register.

At the moment, this field is only used by the LLVM backend. The default
backend always sets ar_chan = 0.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
bff07638a86d36ac826fb287214eda9ce31c02ad 07-Jan-2013 Jerome Glisse <jglisse@redhat.com> r600g: add multi ring support with dma as first second ring v4

We keep track of ring emission order in a stack, whenever we need to
flush we empty the stack in a fifo order. There is few helpers function
for bo mapping and other ring activities that will make sure that
the ring stack is properly flush and submitted.

v2: fix st flush path, and other flush path to properly flush all
rings if necessary
v3: - improve name of ring helpers
- make sure that each time a cs is gona be written it endup at
top of the stack to avoid any issue such as :
STACK[0] = dma (withbo A,B)
STACK[1] = gfx (withbo C,D)
Now if code try to emit a dma command relative to bo C or D
it will start writting cmd stream into the cs and once it
reach the point where it adds relocation it will flush.
At that point the cs will have cmd that don't have proper
relocation into the relocation buffer and kernel will just
refuse to run.
v4: - Drop the stack idea as it turn out there is no way to use it
or benefit from it. Any time the driver start command on other
ring, it always need to flush the previous ring. So make code
simpler by not using a stack.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
3b14ce2cafea03de1b39e44cc8c37439b031e3eb 11-Jan-2013 Vincent Lejeune <vljn@ovi.com> r600g/llvm: tgsi to llvm emits store.swizzle intrinsic for vs/fs output

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7b205264667f5b5b59dfb721cfc701d1f482de99 11-Jan-2013 Vincent Lejeune <vljn@ovi.com> r600g/llvm: tgsi to llvm emits stream output intrinsics.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7d532800d8be5ce31731658564691ae9cdaacf7a 08-Jan-2013 Vadim Girlin <vadimgirlin@gmail.com> r600g/llvm: rework handling of the constants

Vincent Lejeune:
- tgsi to llvm now emits pointers for constants

Tom Stellard:
- Only use texture cache for vtx fetch with compute shaders
- Change address space used for constant loads to match LLVM
backend.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d23aa650015ec017649f5a4ce8cb12d8c314bd3a 16-Dec-2012 Dave Airlie <airlied@redhat.com> r600g: texture buffer object + glsl 1.40 enable support (v2)

This adds TBO support to r600g, and with GLSL 1.40 enabled,
we now get 3.1 core profiles advertised for r600g.

The r600/700 implementation is a bit different from the evergreen one,
as r6/7 hw lacks vertex fetch swizzles. So we implement it by passing 5
constants per sampler to the shader, the shader uses the first 4 as masks
for each component and the 5th as the alpha value to OR in.

Now TXQ is also broken so we have to pass a constant for the buffer size,
on evergreen we just pass this, on r6/7 we pass it as the 6th element
in the const info buffer.

v1.1: drop return as DDX doesn't use a texture type
v2: add r600/700 support.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
77c10225eef43eb428ebbc80f1dd426e3d33b281 16-Dec-2012 Dave Airlie <airlied@redhat.com> r600g: uniform buffer object support

This adds 12 more constant buffers for use as UBOs,
along with adding relative constant fetching for 2D indices.

This with GLSL 1.40 enabled passes all the same tests as softpipe
on my evergreen system.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
199eea4a4be342c255c1e5e22a39b79d316d52a4 11-Jan-2013 Dave Airlie <airlied@redhat.com> r600: always export a position from vertex shader

This fixes piglit glsl-1.40-tf-no-position from gpu hanging on my rv635
at least.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ca474f98f2cda5cb333e9f851c7e0e31c9a6f823 04-Jan-2013 Jerome Glisse <jglisse@redhat.com> radeon/winsys: move radeon family/class identification to winsys

Upcoming async dma support rely on winsys knowing about GPU families.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
fefa2112bf02db6908fd3f2603f11d1a2bc10688 19-Dec-2012 Marek Olšák <maraeo@gmail.com> r600g: refactor and make streamout dumping more informative

Reviewed-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6a2ec765bd22ae5d94e5fdac8507c659175efa4e 19-Dec-2012 Marek Olšák <maraeo@gmail.com> r600g: try to fix streamout for the cases where BURST_COUNT > 0

The burst was incorrectly used, because ELEM_SIZE was always 0.
I don't know if the burst works, because I don't know of any test
which uses it.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
72362ebefb48cb79355b1e295ca21341d45ea85c 19-Dec-2012 Marek Olšák <maraeo@gmail.com> r600g: lower stream outputs with dst_offset < start_component

This fixes streamout breakage caused by the varying packing.

Reviewed-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d0e40bd3ed13ff58a898686a5b0d6238d7a1728e 19-Dec-2012 Marek Olšák <maraeo@gmail.com> r600g: use r600_get_temp to get temporaries for CLIPDIST shader outputs

I need this to be able to use r600_get_temp in the function later.

Reviewed-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
63cabf0abb2b05043205899e86a455b340142afe 18-Dec-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: initialize inst_mod in r600_tex_from_byte_stream

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
fa5078c255b5b57514ae854ecd6264379641c924 16-Dec-2012 Dave Airlie <airlied@redhat.com> r600g: fixup offset types for printing

This allows the debug code to at least show the sign properly.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6d7d821e3df7dde45fbd7ae2988eee8e94baa14f 13-Dec-2012 Maxence Le Dore <maxence.ledore@gmail.com> r600g/radeonsi: Silence warnings

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c7f9fb37eaa4a6849bb427b6096e52eb0daa9925 06-Nov-2012 Vincent Lejeune <vljn@ovi.com> r600g: use load_ar checks with llvm output.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
3fcb3fbf22063cabfec04700dcf5aa4a2f30760f 28-Nov-2012 Vincent Lejeune <vljn@ovi.com> r600g: mirror simplification of if/break opcodes

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
eb44c36df842af010269eda1be77c4aea8ebe736 03-Nov-2012 Dave Airlie <airlied@gmail.com> r600g: add initial cube map array support (v2)

This contains the evergreen support.

Support is possible on rv670 upwards and the code in here
should work, but it doesn't and I haven't debugged it to
figure out why.

Beyond just adding support for the cube map array sampling,
r600 resinfo isn't conformant with the GL specification,
which states the number of layers should be returned for
the textureSize, so we have to track in an external
constant buffer the layers for each sampler if we need
them in the shader.

v2: only update the sampler constants if the sampler views have changed,
as suggested by Marek.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
037b4f80384c72c12e31192d1a30411d4660972d 06-Nov-2012 Dave Airlie <airlied@redhat.com> r600g: fix lod bias/explicit lod with cube maps.

While developing cube map array support I found that we didn't
support this properly, also piglit didn't test for it at all.

I've submitted a test to piglit to check for this, and this
fixes explicit lod and lod bias with cube maps.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7356579540cf22743ce93a080a41bc2dc2bb150b 06-Nov-2012 Dave Airlie <airlied@redhat.com> r600g: clarify const buffer numbering and handling

For cube map arrays I'll need another driver private constant
buffer, and looking forward to UBOs. So clean up with some
defines, that can be modified when adding cube map array and ubos
later.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0b61f0b14894792baa48d59ff3df167334c7d83e 07-Nov-2012 Alex Deucher <alexander.deucher@amd.com> r600g/compute: fix call to r600_bytecode_init

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
84b437213294ff4e1a3bcae2f9cbb36a9b4955c4 29-Sep-2012 Vincent Lejeune <vljn@ovi.com> r600g: make tgsi-to-llvm generates store.pixel* intrinsic for fs

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5ab82e0ccf84855e9311ebfc58d1b57b437ed991 19-Oct-2012 Vincent Lejeune <vljn@ovi.com> r600g: tgsi-to-llvm emits right input intrinsics

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
96ed6c90eff58ce030c39c2b4db6daf512586b34 12-Oct-2012 Marek Olšák <maraeo@gmail.com> r600g: implement texturing with 8x MSAA compressed surfaces for Evergreen

The 2x and 4x MSAA cases are completely broken. The lfdptr instruction returns
garbage there.

The 8x MSAA case is broken on Cayman, though at least the result looks somewhat
correct.

Only the 8x MSAA case works on Evergreen and is enabled.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d1eaa9ea70c7c1d77904bedf9cbac2e48bc41de9 18-Oct-2012 Vincent Lejeune <vljn@ovi.com> r600g: rewrite tgsi-to-llvm load-input to handle fragcoord

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d2b0338e3354fadc90a3751520f4aa44ba01954f 17-Oct-2012 Tom Stellard <thomas.stellard@amd.com> r600g: Remove special handling of PRED_SET* insructions for LLVM 3.2

The 3.2 version of the backend now sets all the correct fields for
PRED_SET* instructions.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
555c8d500a4a09445a892316610a428d408318ed 12-Oct-2012 Marek Olšák <maraeo@gmail.com> r600g: move shader structures into r600_shader.h
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8bf7044ec6ab041ebeb1db9ebe378f8e1f455f4e 05-Oct-2012 Marek Olšák <maraeo@gmail.com> r600g: remove the dual_src_blend flag from the shader key

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
11e08f42e4fa5f1d296429415be6da7c03f105b0 23-Sep-2012 Vincent Lejeune <vljn@ovi.com> r600g: use a select to handle front/back color in llvm

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
80663cb1859c3398804d720022eebcf9a0df1716 23-Sep-2012 Vincent Lejeune <vljn@ovi.com> r600g: frontcolor tracks its associated backcolor

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
92b3a99ce5f54f2c692c8db5a0c471aac0ff7c82 23-Sep-2012 Vincent Lejeune <vljn@ovi.com> r600g: add some members to radeon_llvm_context

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a1a3792b180e453d26bfd09853eee88460dfc466 23-Sep-2012 Vincent Lejeune <vljn@ovi.com> r600g: tgsi-to-llvm path is taken after declarations have been parsed

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
96f50d0cf7bb13507f272d2f6ef9a6fca24d18e1 25-Sep-2012 Marek Olšák <maraeo@gmail.com> r600g: fix EXP on Cayman

NOTE: This is a candidate for the stable branches.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
fd5c5384648a0d6191c19748a2d1f1148c5ee98f 25-Sep-2012 Marek Olšák <maraeo@gmail.com> r600g: fix RSQ of negative value on Cayman

NOTE: This is a candidate for the stable branches.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
bbb2ebe2fc073793c5129b164b61fe1b36dfc4b1 22-Sep-2012 Tom Stellard <thomas.stellard@amd.com> r600g: Fix build with LLVM compiler
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b6521801070d52bdd5908824e82c1ce2dde16e8e 17-Sep-2012 Marek Olšák <maraeo@gmail.com> r600g: don't snoop context state while building shaders

Let's use the shader key describing the state.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
810345492eca34c2ad12728b5491a4691cc62ec2 17-Sep-2012 Tom Stellard <thomas.stellard@amd.com> r600g: Use LOOP_START_DX10 for loops

LOOP_START_DX10 ignores the LOOP_CONFIG* registers, so it is not limited
to 4096 iterations like the other LOOP_* instructions. Compute shaders
need to use this instruction, and since we aren't optimizing loops with
the LOOP_CONFIG* registers for pixel and vertex shaders, it seems like
we should just use it for everything.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0e0c21e00ee80bcff67e37ec86b97d6c25db066a 12-Sep-2012 Michal Sciubidlo <michal.sciubidlo@gmail.com> radeon/llvm: Emit ISA for ALU instructions in the R600 code emitter

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ef0d7e13d7633b2d855e95dc7de2bb833592ec70 17-Sep-2012 Xinya Zhang <zxy_thf@hotmail.com> r600g: Close a memory leak of llvm byte streams

No regressions found in the tests of opencl-example/run_tests.sh.

Signed-off-by: Xinya Zhang <zxy_thf@hotmail.com>
Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c56dca909a0dc1410301c48618768adf58023fe7 10-Sep-2012 Marek Olšák <maraeo@gmail.com> r600g: add clip_misc_state for clip registers emitted in draw_vbo

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5067506ea6ada5eeae33b1acf1c916e00121c12a 04-Sep-2012 Matt Turner <mattst88@gmail.com> Remove useless checks for NULL before freeing

This patch has been generated by the following Coccinelle semantic
patch:

// Remove useless checks for NULL before freeing
//
// free (NULL) is a no-op, so there is no need to avoid it

@@
expression E;
@@
+ free (E);
+ E = NULL;
- if (unlikely (E != NULL)) {
- free(E);
(
- E = NULL;
|
- E = 0;
)
...
- }

@@
expression E;
type T;
@@
+ free ((T) E);
+ E = NULL;
- if (unlikely (E != NULL)) {
- free((T) E);
(
- E = NULL;
|
- E = 0;
)
...
- }

@@
expression E;
@@
+ free (E);
- if (unlikely (E != NULL)) {
- free (E);
- }

@@
expression E;
type T;
@@
+ free ((T) E);
- if (unlikely (E != NULL)) {
- free ((T) E);
- }

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2b7a972e3f36bfcdc6fbe2b59d7ffdcde49c9405 04-Sep-2012 Matt Turner <mattst88@gmail.com> Don't cast the return value of malloc/realloc

This patch has been generated by the following Coccinelle semantic
patch:

// Don't cast the return value of malloc/realloc.
//
// Casting the return value of malloc/realloc only stands to hide
// errors.

@@
type T;
expression E1, E2;
@@
- (T)
(
_mesa_align_calloc(E1, E2)
|
_mesa_align_malloc(E1, E2)
|
calloc(E1, E2)
|
malloc(E1)
|
realloc(E1, E2)
)
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b8e9cf5d965ce09227cd9875c4381c73f237f196 15-Aug-2012 Marek Olšák <maraeo@gmail.com> r600g: make F2U trans-only on r600-r700

This fixes a failing assertion in r600_asm.c.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8f597d57e959830040473b548e0e04cfc63866c2 04-Aug-2012 Vincent Lejeune <vljn@ovi.com> r600g: Glue to handle predicate aware output from llvm

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
da676eab93e7dad30b574b4eb4cffd4df952e819 01-Aug-2012 Vincent Lejeune <vljn@ovi.com> r600g: Add support for predicates

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6d3ad2dd2ba3ccdd211dbc618404519930631be2 09-Aug-2012 Marek Olšák <maraeo@gmail.com> r600g: implement TXQ_LZ opcode
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
26cb887ea213be2445e0fd64364d9264ed4fbfd2 04-Aug-2012 Marek Olšák <maraeo@gmail.com> r600g: implement alpha-to-one
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2fae8227ad906a6d6290134368b62f5dd3a1858e 13-Aug-2012 Tom Stellard <thomas.stellard@amd.com> radeon/llvm: Use correct opcocde for BREAK_LOGICALNZ_i32
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
cd97a5f660399212a23b6dcd02906231f2dc5525 04-Aug-2012 Dave Airlie <airlied@redhat.com> r600g: fix F2U opcode translation

Signed-off-by: Marek Olšák <maraeo@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
bc4b4c605cc04138e5209782fa5939bfd71930bd 14-Jul-2012 Vincent Lejeune <vljn@ovi.com> radeon/llvm: Fix a bug with IF LOGICALNZ with int operand

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
15ca9d159e50815b0bfe60df8873f48c32a59ca5 14-Jul-2012 Marek Olšák <maraeo@gmail.com> r600g: don't check the R600_GLSL130 env var

GLSL 1.3 has been enabled by default for quite a while.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2c485cda2062ca2b9af89ea62618515d960c7904 29-Jun-2012 Tom Stellard <thomas.stellard@amd.com> radeon/llvm: Emit raw ISA for vertex fetch instructions
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0c47d9dcab80923c61b3f5375128e9b511b842fb 26-Jun-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: avoid unnecessary shader exports v2

In some cases TGSI shader has more color outputs than the number of CBs,
so it seems we need to limit the number of color exports. This requires
different shader variants depending on the nr_cbufs, but on the other hand
we are doing less exports, which are very costly.

v2: fix various piglit regressions

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4acf71f01ea1edb253cd38cc059d4af1a2a40bf4 11-Jun-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: cache shader variants instead of rebuilding v3

Shader variants are stored in the list, the key for lookup is based on the
states that require different hw shaders - currently it's rctx->two_side (all
gpus) and rctx->nr_cbufs (evergreen/cayman, when writes_all property is set).

v2:
- use simple list instead of keymap as suggested by Marek on irc
- call r600_adjust_gprs from r600_bind_vs_shader for r6xx/r7xx
(r600_shader_select isn't used for vertex shaders currently)

v3:
- fix call to r600_adjust_gprs - do it after updating current shader

Improves performance for some apps, e.g. FlightGear -
see https://bugs.freedesktop.org/show_bug.cgi?id=50360

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5cd6ce939d1158d0ee3dd376e2c95aeff49c6e27 07-Jun-2012 Tom Stellard <thomas.stellard@amd.com> r600g: Fix reading vtx instruction offset from bytestream
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0c4b19ac63efa41242c515824301e6161aceeea5 05-Jun-2012 Tom Stellard <thomas.stellard@amd.com> r600g: Compute support for Cayman
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c108831d4451f624167d2c433282c6ac63541a79 01-Jun-2012 Tom Stellard <thomas.stellard@amd.com> radeon/llvm: Emit 2 bytes for vertex fetch offsets
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6a829a1b724ca0d960decee217d260b4de8a5463 30-Nov-2011 Adam Rak <adam.rak@streamnovation.com> r600g: compute support for evergreen

Tom Stellard:
- Updated for gallium interface changes
- Fixed a few bugs:
+ Set the loop counter
+ Calculate the correct number of pipes
- Added hooks into the LLVM compiler
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a1a0974401c467cb86ef818f22df67c21774a38c 25-May-2012 Vadim Girlin <vadimgirlin@gmail.com> Revert "r600g: set round_mode to truncate and get rid of tgsi_f2i on evergreen"

This reverts commit 60bf0f05b472e66bf1175fcec7a274dab6f7e2a3.

It seems round_mode behaves differently in some cases depending on the
instruction/slot. Reverting it for now.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=50232

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
1279923d72942ee201fcc6ad40d552143f651f03 30-Apr-2012 Francisco Jerez <currojerez@riseup.net> gallium/tgsi: Move interpolation info from tgsi_declaration to a separate token.

Move Interpolate, Centroid and CylindricalWrap from tgsi_declaration
to a separate token -- they only make sense for FS inputs and we need
room for other flags in the top-level declaration token.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a5f44cc8c2ce0916809ce5da5a2490ad000ef099 01-May-2012 Francisco Jerez <currojerez@riseup.net> gallium/tgsi: Split sampler views from shader resources.

This commit splits the current concept of resource into "sampler
views" and "shader resources":

"Sampler views" are textures or buffers that are bound to a given
shader stage and can be read from in conjunction with a sampler
object. They are analogous to OpenGL texture objects or Direct3D
SRVs.

"Shader resources" are textures or buffers that can be read and
written from a shader. There's no support for floating point
coordinates, address wrap modes or filtering, and, unlike sampler
views, shader resources are global for the whole graphics pipeline.
They are analogous to OpenGL image objects (as in
ARB_shader_image_load_store) or Direct3D UAVs.

Most hardware is likely to implement shader resources and sampler
views as separate objects, so, having the distinction at the API level
simplifies things slightly for the driver.

This patch introduces the SVIEW register file with a declaration token
and syntax analogous to the already existing RES register file. After
this change, the SAMPLE_* opcodes no longer accept a resource as
input, but rather a SVIEW object. To preserve the functionality of
reading from a sampler view with integer coordinates, the
SAMPLE_I(_MS) opcodes are introduced which are similar to LOAD(_MS)
but take a SVIEW register instead of a RES register as argument.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8c98635d4fc7437b05debe337aef2377df685c0c 07-May-2012 Kai Wasserbäch <kai@dev.carbon-project.org> r600g: Handle TGSI_OPCODE_CEIL (v2)

v2: Enabled CEIL on Cayman too.

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b4789860c4416ba700ac5edeb692b59e33d45276 30-Apr-2012 Tom Stellard <thomas.stellard@amd.com> r600g/llvm: Mask write of pred_inst in llvm_if()
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
18617d7423b2c12aac9adbb8354fbf5d0c8ddfea 27-Apr-2012 Tom Stellard <thomas.stellard@amd.com> r600g: Add support for reading BREAK_LOGICALZ_i32 from bytestream
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
e42df8e10a83e76565474f82330d34403da71b49 29-Feb-2012 Tom Stellard <thomas.stellard@amd.com> r600g: Add support for reading vertex fetches from bytestream

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6f50f939ef85bb058c1401b5dad8340aa4f96aec 27-Feb-2012 Tom Stellard <thomas.stellard@amd.com> r600g: Add support for reading native instructions from the LLVM bytestream

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0a6120244e66494db070ce875c0a464fbc5b15a1 26-Apr-2012 Marek Olšák <maraeo@gmail.com> winsys/radeon: simplify buffer map/unmap functions

The idea is not to use pb_map and pb_unmap wrappers, calling straight
into the winsys.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7f5420762c0e3cb21bda66ea8ea32b516a4e3660 23-Apr-2012 Brian Paul <brianp@vmware.com> r600g: init vars to silence warnings
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ced73ea5df306156e5383b438d6858e58b1479e5 17-Apr-2012 Tom Stellard <thomas.stellard@amd.com> r600g: Add hooks for the LLVM shader compiler

The LLVM backend can now be enabled for r600g by using the
--enable-r600-llvm-compiler configure flag. If you configure with this
flag, you can still use the default compiler by setting the envrionment
variable R600_USE_LLVM=0

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
951b888be45539e5d5b535a5a393df719fae4172 09-Apr-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: disable I2F conversion for InstanceID if integers are supported

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
783e4da72aa203a645737dec81b001341951a942 09-Apr-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: check gpr count limit

This should help to prevent gpu lockups.
See https://bugs.freedesktop.org/show_bug.cgi?id=48472

NOTE: This is a candidate for the stable branches.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
330b6c85c961b32f704ce8ec7dbf8cb7fc0b80a8 05-Mar-2012 Marek Olšák <maraeo@gmail.com> r600g: cleanup includes
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
370c8b5ee7666f4f515d63603afe8282b1b3c682 24-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: remove obsolete todo comments

Also use XXX in the other ones, because it's the most used word for that
purpose in Mesa.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
192467108b282c19da3b11647a7a802b3d890193 06-Feb-2012 Christian König <deathsimple@vodafone.de> r600g: fix handling of outputs as TEX addr sources

Outputs should be treated in the same way as
inputs and temporaries here.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
e4340c1908a6a3b09e1a15d5195f6da7d00494d0 29-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: merge r600_context with r600_pipe_context

The split made no sense.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
78293b99b23268e6698f1267aaf40647c17d95a5 29-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: remove u8,u16,u32,u64 types
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
e3032a052321ea1fdfbca090618149ae1ed33911 28-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: use a more clever way to disable per-vertex point size

This uses point size clamping to force point size to a particular value,
making the vertex shader output irrelevant.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
29cf90b4148ca8b625215644ef8d65a83815db11 23-Jan-2012 Dave Airlie <airlied@redhat.com> r600g: fix udiv/idiv/umod/imod on cayman

Cayman needs some of the MUL instructions spread across a full slot
of vectors.

It also no longer has RECIP_UINT, the recommendation is to replace it
with a U2F + RECIP_IEEE + MUL + F2U.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
cb40165974856e5fc4fb7b138b3d9b1b0679cf18 30-Jan-2012 Dave Airlie <airlied@redhat.com> r600g: fix fragcoord.w test on cayman
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8ec05f06cba381ce757e18bc7c41f0bd33205926 25-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: handle start_component from stream_output_info when possible
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c2b800cf38b299c1ab1c53dc0e4ea00c7acef853 23-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: nuke the fallback for vertex and fragment color clamping
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
738334e80cf8a7b9fbf573f3a77cbf767ce81095 24-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: fix inconsistency with INTERP* opcode definitions

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d89c96c75dbb9c003e4643942f2cce8d6cd4995b 23-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: fix loop break/continue operations

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c4d644bac1e738af7e2a3f1bef7eea09df8bb81c 23-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: fix fragcoord.w

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5a84cc4ebcc99fb029d5f855e8afa11fab09266a 23-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: fix interpolation with clipvertex

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d01e16639153df9f615993c25b98d5b04fb0f0a4 23-Jan-2012 Dave Airlie <airlied@redhat.com> r600g: cayman fix integer multiplies

Looks insane, but it does appear we need a full slot per input/output.

This fixes another 180 or so piglit tests.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f01431d0358ae337227a348e96b30adfd8d55f7c 23-Jan-2012 Dave Airlie <airlied@redhat.com> r600g: cayman initial integer support

Adds all the easier lowhanging opcodes.

Fixes ~3000 piglit tests with GLSL1.30 enabled on cayman.

This just leaves the mul/div/mod ops to fix up.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
13daa059c01d6dd05064e82cf67cba9cc5fe79db 23-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: fix VS fog export

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9783bba9bdd56cc52f987056ba8dc3da77d0078e 22-Jan-2012 Dave Airlie <airlied@redhat.com> r600g: initial cube shadow sampling

It doesn't pass the piglit test, but it seems to be a lot closer
than it was before. I need to track down if there is another problem.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
60bf0f05b472e66bf1175fcec7a274dab6f7e2a3 21-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: set round_mode to truncate and get rid of tgsi_f2i on evergreen

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
54e8dcaad65cbe3603730414fd8d76ac53f89a86 20-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: implement clip vertex v2

Clip planes are uploaded as a constant buffer and used by the vertex
shader to produce corresponding clip distances for hw clipping.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
261dc72fe3ce969bb4592ac49280147cd72f4414 21-Jan-2012 Dave Airlie <airlied@redhat.com> r600g: no need to do CUBE coordinate handling for TXQ.

Fixes texSize on cube.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c97632642a7d84a8a21ffde37b3907632e0d01c0 18-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: fix combined MEM_STREAM instructions

BURST_COUNT is clipped with ARRAY_SIZE, so set it to the max value
to avoid clipping.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c96b9834032952492efbd2d1f5511fe225704918 18-Jan-2012 Dave Airlie <airlied@redhat.com> r600g: fixup AR handling (v5)

So it appears R600s (except rv670) do AR handling different using a different
opcode. This patch fixes up r600g to work properly on r600.

This fixes ~100 piglit tests here (in GLSL1.30 mode) on rv610.

v3: add index_mode as per the docs.

This still fails any dst relative tests for some reason I can't quite see yet,
but it passes a lot more tests than without.

v4: add a nop after dst.rel this could be improved using a second pass,
where we only insert nops if two instructions are sure to collide.
The docs say r600, rv610, rv630 needs this, and not rv670, rs780, rs880,
need AMD to confirm rv620, rv635.

v5: add is_nop_inst.

NOTE: This is a candidate for stable branches.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0196433ce55b7e005c483bd7c411844eb44e983b 18-Jan-2012 Dave Airlie <airlied@redhat.com> r600g: fix ISLT on r600/700

This fixes ISLT like evergreen.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5893e686b691013525cb2608c3d605be2d8ea471 18-Jan-2012 Dave Airlie <airlied@redhat.com> r600g: make r600/700 use correct ineg.

Noticed by Vadim Girlin on irc.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b69728cba53765f6799a66ebcab2058be6d53602 18-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: fix UINT_TO_FLT on evergreen

It should be processed as trans-only.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7383e754b70414b35c10c216034a8dc95f6f67b4 16-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: fix USLT for r600-eg
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4ba4853c0a613f771b44806cd5ce376838479802 17-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: rework IDIV/UDIV and implement MOD/UMOD (v2)

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
850021f225f312d55fb6a24a8cef805f527510af 15-Jan-2012 Dave Airlie <airlied@redhat.com> r600g: fix mullo_uint trans slot only on r600/r700

This fixes 8 piglit tests that currently assert.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
91d47296967ebfaf685f3870998ea0a1450ecf55 15-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: implement clip distances

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
725a820b926575265e6790601a0defd9c30947dc 06-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: implement two-sided lighting (v3)

v2: select the colors in the pixel shader

v3: fix rs state creation for pre-evergreen

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d84ab821c5f5bfe9f6a57e434af9ca06d54f45b3 15-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: add support for ISHR/USHR/SHL on r600-evergreen

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
332e1d6d84353b8fac0b9619488b9dc83fe9ace1 15-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: implement IDIV/UDIV on r600-evergreen

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
42539d569a765750e99254ff4db76dfaf014f0e6 15-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: implement ISSG on r600-evergreen

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6b44470bb2103d5a9c3cf5f2fb4490566971476c 15-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: implement IABS on r600-evergreen

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
beb297f2842af34bf063a2c659a411b0a6896ee1 15-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: implement F2U on evergreen

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a9302de4a3297cab9996a5b6cbfde425b89771a7 15-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: fix F2I on evergreen

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
39491d1d31d9f03437816fbb4f2872761ae1157c 14-Jan-2012 Dave Airlie <airlied@redhat.com> r600g: vertex id support.

This requires GLSL 1.30 enabled, which requires integer types enabled,
so don't bother doing an INT to FLT conversion on it.

We should probably remove the instance id flt->int conversion when
turning on native integers.

this passes the three piglit tests with GLSL 1.30 forced on.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9a401a2fd6c2d9aa07402e33493be3f014c0fe10 15-Jan-2012 Dave Airlie <airlied@redhat.com> r600g: make u2f trans only

as per the r600 isa doc.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2449695e822421fdcaf1c66dffc12d7d705ea69d 17-Dec-2011 Marek Olšák <maraeo@gmail.com> gallium: improve the pipe_stream_output_info struct (v2)

There are 3 changes:

1) stride is specified for each buffer, not just one, so that drivers don't
have to derive it from the outputs

2) new per-output property dst_offset, which specifies the offset
into the buffer in dwords where the output should be stored,
so that drivers don't have to compute the offsets manually;
this will also be useful for gl_SkipComponents
from ARB_transform_feedback3

3) register_mask is removed, instead, there is start_component
and num_components; register_mask with non-consecutive 1s
doesn't make much sense (some hardware cannot do packing of components)

Christoph Bumiller: fixed nvc0.

v2: resolve merge conflicts in Draw and clean it up
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
bfcffd4d721d87bb6287980a09e0296ceed0bba3 14-Jan-2012 Dave Airlie <airlied@redhat.com> r600g: fix r600 f2i to be trans only emitted.

This fixes a lot of asserts about the trans unit being used already.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
543b2331d7b45a29ccd3530daa2389e87e65d89b 08-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: implement transform feedback

r600: DONE.
r700: MOSTLY (done but locks up).
Evergreen: MOSTLY (done but doesn't work for an unknown reason).

The kernel support will come soon.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4f7c21899ad449be2bc1157ce1d2d99296a34499 14-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: fix the representation of control-flow instructions

We need something that looks like a compiler and not like some hacker
put some functions together. /rant

This is a band-aid for these two problems:
- The R600 and EG control-flow instructions appear in switch statements
next to each other, causing conflicts when adding new instructions.
- The ALU control-flow instructions are bitshifted by 3 (from CF_INST 26:29
to CF_INST 23:29, as is defined by r600 ISA) even for EG, where CF_INST
is 22:29.

To fix this mess, the 'inst' field is bitshifted to the left either by 22, 23,
or 26 (directly in the definitions), such that it can be just or'd when making
bytecode without any shifting. All switch statements have been divided into
two, one for R600 and the other for EG.

Of course, there is a better way to do this, but that is left for future
work.

Tested on RV730 and REDWOOD with no regressions.

v2: minor cleanup as per Alex's comment.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a2bcaba1cdc4c06868d95c613a28584743471361 06-Oct-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: mask write for fake VS export components
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8e366dc365d01213b71b87ace47d30938db74845 13-Nov-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: lazy load for AR register

Emit MOVA* instruction only when AR is used.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
60302f83e2344195f9a1c37215def09fa9c45ff9 08-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: clarify meaning of one variable in shader codegen

It's easier to read now.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5b27b63de64167a84a03d820550e56c4b7bbc69d 05-Nov-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: precalculate semantic indices for SPI setup

There is no need to duplicate semantic mapping which is done in hw, so get
rid of r600_find_vs_semantic_index.

TGSI name/sid pair is mapped to the 8-bit semantic index for SPI.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
df121b868a13e7ca76f19d1488b625c02d632a47 04-Nov-2011 Alex Deucher <alexander.deucher@amd.com> Revert "r600g: precalculate semantic indices for SPI setup"

This reverts commit c15f8569fddac5f8aee77863922fd5bb992cfe8a.

This breaks r6xx.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c15f8569fddac5f8aee77863922fd5bb992cfe8a 04-Nov-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: precalculate semantic indices for SPI setup

There is no need to duplicate semantic mapping which is done in hw, so get
rid of r600_find_vs_semantic_index.

TGSI name/sid pair is mapped to the 8-bit semantic index for SPI.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c6a302647200cb0bbc0d0d7680ad4e9fc5dd94bf 12-Oct-2011 Dave Airlie <airlied@redhat.com> r600g: more integer support

just some more trivial integer changes for r600/r700.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0a2c4889cb78825035317ba6bf33440c81eabdfe 02-Nov-2011 Alex Deucher <alexander.deucher@amd.com> r600g: add comment about special shader exports

Certain exports (position, point size, etc.) are treated
specially by the shader and not counted as generic exports.

Note the exports and any relevant related state bits.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
16c0a3a9720c03c3d5cbfd66e2db63014dfc4f19 02-Nov-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: take into account PSIZE output for spi mapping

Skip PSIZE and POSITION when counting VS outputs.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=42435

Tested without regressions on evergreen.

NOTE: this is a candidate for the 7.11 branch.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8b36958ceb23b8a40a622f950ddf8fe94583c143 22-Oct-2011 Dave Airlie <airlied@redhat.com> r600g: make if's use PRED_SETNE_INT no matter what.

This is more correct for TGSI if, and with native ints enabled
it fixes 25 piglit fails.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
608a7009d93d589a93a90a4d8edb9fdf360c98a6 22-Oct-2011 Dave Airlie <airlied@redhat.com> r600g: drop specific i2f it should be a trans only op2.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9b34cea7e91f90023ca3490603155d758cbdee1c 25-Sep-2011 Dave Airlie <airlied@redhat.com> r600g: uarl fixes.

Not 100% sure these are correct yet
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
024ac93e60921295ee7a49de1782eeaffd597fa0 02-Oct-2011 Marek Olšák <maraeo@gmail.com> r600g: fix parsing TGSI declarations

It was a lucky coincidence that it worked.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6101b6d442b06a347c001fe85848d636ab7df260 11-Sep-2011 Marek Olšák <maraeo@gmail.com> r600g: merge r600_bo with r600_resource

I have moved 'last_flush' and 'binding' from r600_bo to winsys/radeon.
The other members are now part of r600_resource.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
21c5607e64ca4ef68730d8e846d8e7744ecdd024 15-Sep-2011 Dave Airlie <airlied@redhat.com> r600g: add flat non-interpolation support.

TGSI CONSTANT interpolation is just flat, and we just read the values
direct from the LDS into the GPR without doing any interpolation on them.

This is needed to pass integer types into the fragment shader.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6b9a36cc3ff3b0a65f70b8a5503e26339a0e4fbe 05-Sep-2011 Marek Olšák <maraeo@gmail.com> r600g: fix shadow rect samplers
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c8b0b13d40d2686ff34ead1ac98cc98df3530480 05-Sep-2011 Marek Olšák <maraeo@gmail.com> r600g: use SAMPLE_LB for OPCODE_TXB
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
929ad43b11cfc24f3e27bc1da2523b7fc142917f 05-Sep-2011 Marek Olšák <maraeo@gmail.com> r600g: add support for shadow array samplers

I had to guess & verify how some of the SAMPLE instructions work.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
1d52ddc3bba276451fdd690a5e9f430505278062 24-Aug-2011 Dave Airlie <airlied@redhat.com> r600g: add TXQ and TXF support

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
cdeffbfddceaccaad5d78f5c95426f41dec74fe5 05-Aug-2011 Dave Airlie <airlied@redhat.com> r600g: add initial evergreen integer opcode support

This just adds the opcodes for evergreen, need to work on r600 and cayman
implementations.

don't advertise nativeintegers yet until we work out all the regressions.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
cc9a8915f093c57d2748370d18ed47f66c933013 24-Aug-2011 Dave Airlie <airlied@redhat.com> r600g: fill out missing entries in opcode tables.

this just adds the missing opcodes as unsupported.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4a47662beaa2092447939db7880531fb706afedd 16-Aug-2011 Marek Olšák <maraeo@gmail.com> r600g: rename bc -> bytecode

It took me a while to figure out what it stands for.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
041ed559e11ee99d720c8132428c07d8fe57ec81 04-Aug-2011 Marek Olšák <maraeo@gmail.com> r600g: remove an unused parameter from r600_bo_destroy

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ab630b5768b0bfa4d7729d110ce4fb8f42e0cfb9 04-Aug-2011 Marek Olšák <maraeo@gmail.com> r600g: use buffer_map/unmap from radeon_winsys

This also drops the unneeded bo_busy/wait functions.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
df7859be6b6b6c227e7a4e0b7fbfafcd0800f4f8 07-Aug-2011 Lauri Kasanen <cand@gmx.com> r600g: Add support for ROUND, v2

This is a GLSL 1.3 feature, but also used by MLAA.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2bde0cc95d8db10b6d2c6689ca39c196a81248b0 03-Aug-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: take into account force_add_cf in pops

When we have two ENDIFs in a row, we shouldn't modify the pop_count
for the same alu clause twice.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38163

Note: this is a candidate for the 7.11 branch.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
dc1c0ca22a1c7fcaef90b787290144d8e3d77c33 29-Jul-2011 Alex Deucher <alexander.deucher@amd.com> r600g: fix up vs export handling

Certain attributes (position, psize, etc.) don't
count as params; they are handled separately by the hw.
However, the VS is required to export at least one param
and r600_shader_from_tgsi() takes care of adding a dummy
export if there is none. Make sure the VS param export
count in the SPI properly accounts for this.

Note: This is a candidate for the 7.11 branch.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4d23c6df81639057f12a604556121aa7b41d921c 24-Jul-2011 Christian König <deathsimple@vodafone.de> r600g: use file_max instead of file_count to determine reg offset

Otherwise shaders with skipped inputs/outputs doesn't work correctly.

Signed-off-by: Christian König <deathsimple@vodafone.de>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f0a7e28e29b5005c20ac02a7eec6511f6d7fd1c4 10-Jul-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: LIT: clamp negative src.y to 0

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39083

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2b5b289a570c699403f115cf3ad094ce92eba2fb 09-Jul-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Store the chip class directly in r600_bc.

Instead of deriving it from the family again.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
89dc31a28d8e5607989ec11cfd29310c1c97f6ac 09-Jul-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Replace the CHIPREV_* defines with the chip_class enum.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4f7dfd8ad3185f006e7ae8ed86bafd4d66ebc903 09-Jul-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Get rid of the superfluous family field from r600_shader.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
3efb47f0b0557a6b96a7e41b27725cea4736a061 08-Jul-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: introduce r600_bc_src_toggle_neg helper and fix SUB & LRP

SUB & LRP instructions should toggle NEG bit instead of setting it,
otherwise e.g. "SUB a,b,-1" is translated as "ADD a,b,-1"

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f87d566f4b0e4df18ab60d64951013629bdd624c 08-Jul-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: introduce r600_bc_src_set_abs helper and fix LOG

LOG instruction should use absolute values of source operand.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b693787fdf82d065c548e80944aad14e9ba64def 06-Jul-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: RSQ: clear NEG for operand

Need to clear NEG bit because it applies after ABS, e.g. "RSQ ..., -1"
uses -|1| as operand.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
86f8b4117f35c788c8a043c2e241eb19eaacae8c 06-Jul-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: LIT: swap MUL_LIT operands to fix 0^0

For 0^0 case result of "LOG_CLAMPED ...,0" is -MAX_FLOAT, and then result of
"MUL_LIT ...,0,-MAX_FLOAT,..." is -MAX_FLOAT instead of 0 because of special
src1 checks for -MAX_FLOAT. So swap src0/1:
"MUL_LIT ...,-MAX_FLOAT,0,..." to get expected 0, then result of
"EXP_IEEE ...,0" is 1 as expected for LIT.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
feec48114b261f43c8dc94c06cfccea3b6ef1689 25-Jun-2011 Alex Deucher <alexdeucher@gmail.com> r600g: eg+ support for FS_COLOR0_WRITES_ALL_CBUFS

Evergreen+ don't support multi-writes so we need to emulate
it in the shader. Fixes the following piglit tests:
fbo-drawbuffers-fragcolor
ati_draw_buffers-arbfp-no-option

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
eafd331cf3b024001abd3f64861f41cd33a9acb2 24-Jun-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: implement fragment and vertex color clamp

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38440

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8567e02dca6a944c703185f268a7a624fdd65482 24-Jun-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: LIT: fix x&y slots order

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
abe74a9820bc5b512ab24518622368db20187637 20-Jun-2011 Pierre-Eric Pelloux-Prayer <pelloux@gmail.com> r600g: reorder LIT instructions to support src == dst

the attached patch should be an improvement over Vadim Girlin's patch
fixing LIT instruction for r600g (commit
2fe39b46e73aea37152777fe11d489e0b1bc3f92).

Instructions used in tgsi_lit have been reordered to always write to a
dst channel after the same channel in src has been read (so if src ==
dst, input values are not overwritten before being used).

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2fe39b46e73aea37152777fe11d489e0b1bc3f92 17-Jun-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: fix LIT to handle src==dst properly

Current LIT implementation uses dst components for storing temp
results, possibly overwriting still needed values (depends on the
swizzles).
This patch uses temp reg for one of such cases (found in etqw) and
fixes "LIT R.z, R.xyzz".

Tested on evergreen. Fixes some etqw-demo rendering glitches when
"Lighting" is set to "High" in the settings.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8ab1c5328b12e8b075f62599a84672024aaf2982 17-Jun-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: fix RSQ to use abs value of operand on evergreen

fixes https://bugs.freedesktop.org/show_bug.cgi?id=36917

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
40aec11b7569fcdd2d884629b172af3db3fbaf1d 15-Jun-2011 Mike Kaplinskiy <mike.kaplinskiy@gmail.com> r600g: fix TXD src regs needing fetching.

[airlied: final chunk of Mike's patch from bug 37476
this uses a loop to emit the GRADIENTS and does a check to
see if we need to fetch to a temporary register. It also
increases the context src gpr to 4 which is needed here.]

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6415f256637306fcbaa94fbdaf1bd7692070dce1 15-Jun-2011 Mike Kaplinskiy <mike.kaplinskiy@gmail.com> r600g: use inlines for some common tex instr setup code.

[airlied: taken from Mike's patch in bug 37476]

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
de91ea1c06d3208edfb132fa8bea76bbd883f05c 15-Jun-2011 Mike Kaplinskiy <mike.kaplinskiy@gmai.com> r600g: fix TXD when shadowing is enabled.

Mike had actually done a lot of the TXD support in a patch in bug
37476 which I see now, I'll add the bits of his work that I didn't think
to add to my work.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
13c9a8552bc83b1ad91442caacf847cb6cead2b5 15-Jun-2011 Dave Airlie <airlied@redhat.com> r600g: add TXD support.

This at least passes the piglit arb_shader_texture_lod-texgrad test,
the AMD shader analyzer seems to multiply the V component by an unspecified
constant value no idea why.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9346d895e7ff6c1f01b46513694542026ffba5cc 13-Jun-2011 Vadim Girlin <vadimgirlin@gmail.com> r600g: skip SPI setup for position and face inputs

fixes fdo bug 38145

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2f0b44f981d1715b62b189f465546d865b10d0f3 04-Jun-2011 Mathias Fröhlich <Mathias.Froehlich@web.de> r600g: Put shaders into immutable buffers.

Put the shader programs into an immutable buffer object.
Also make sure that those object can be taken from the user
space buffer object pool.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7779f6d1dffde2c0501e44adc342e52803de08d4 09-Mar-2011 Dave Airlie <airlied@redhat.com> r600g: add initial cayman acceleration support.

Cayman is the RadeonHD 69xx series of GPUs. This adds support for
3D acceleration to the r600g driver.

Major changes:
Some context registers moved around - mainly MSAA and clipping/guardband related.
GPR allocation is all dynamic
no vertex cache - all unified in texture cache.
5-wide to 4-wide shader engines (no scalar or trans slot)
- some changes to how instructions are placed into slots
- removal of END_OF_PROGRAM bit in favour of END flow control clause
- no vertex fetch clause - TC accepts vertex or texture

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d1b8f8e8b3b41ab6092fa3f18a4891a0198f64de 25-May-2011 Dave Airlie <airlied@redhat.com> r600g: don't lookup a vs semantic for position/face.

These don't need one, and I was seeing 0xff being returned and set in
the GPU registers with some tests.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f8279fb9d82cbbbbaf8a5cc26486142c21d4d2d2 29-Apr-2011 Marek Olšák <maraeo@gmail.com> r600g: print opcodes names instead of numbers
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b2a98c3531c276b76024bb9b10fdd6c3360cb0c9 25-Apr-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Unify comment style somewhat.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d7577ae3a6d6e174ab36d244f6bd4dedd63c3d1d 25-Apr-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Cleanup the big endian support a bit.

In particular, make sure the code is at least compiled on little endian
systems.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6372660d122f4056dffb56d1b93dbd1bbc661f67 24-Apr-2011 Dave Airlie <airlied@redhat.com> r600g: fix glsl-fs-abs-neg

the hw does neg after abs, so don't neg the source in the ABS instruction case.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
843dfe3206c4f397c7911b748373dde5540392a4 19-Apr-2011 Cédric Cano <ccano@interfaceconcept.com> r600g: add big endian support for r6xx/r7xx

Signed-off-by: Cedric Cano <ccano@interfaceconcept.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
244a3bbf14ef4f739e7f3be298c8613a2667fce0 23-Mar-2011 Fabian Bieler <der.fabe@gmx.net> r600g: Handle texture fetch instructions with relative addressing

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
da5b4764b28a1efd2e9dbf0741247288da36f546 23-Mar-2011 Fabian Bieler <der.fabe@gmx.net> r600g: Handle texture fetch instructions with neg or abs on source register

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
78037d95da06b81799e75410154c8141b0a30ec0 23-Mar-2011 Fabian Bieler <der.fabe@gmx.net> r600g: Handle texture fetch instructions with swizzle on source register

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f262ba26f045699f0aa871b6be966714e9dd6740 14-Mar-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Move r600_pipe_shader_ps() to r600_state.c.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c0ca43e507dce11bd4a78bc08a8e92997cd385bf 14-Mar-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Move r600_pipe_shader_vs() to r600_state.c.

The idea behind this is that anything touching registers should be in
r600_state.c or evergreen_state.c. This is also consistent with
evergreen_pipe_shader_vs().

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
112ffdfd0734040a72b690a4ac4101f3211bb238 14-Mar-2011 Rafael Monica <monraaf@gmail.com> r600g: Evergreen add support for log opcode.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0a6f09a76a416b8672e149c520aa5bef33174223 27-Feb-2011 Mathias Fröhlich <Mathias.Froehlich@web.de> r600g: Only update DB_SHADER_CONTROL once in r600_pipe_shader_ps().

Avoid setting the same gpu register several times in a r600_pipe_state.
Compute the final value of the register and set that one time. This avoids
some overhead in r600_context_pipe_state_set().

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0e4750a84dfad00c4fe1706aa42d2ede6e731295 07-Mar-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Simplify some swizzle lookups.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c33e091d17b90df61f7b3873a2f124c4f26adf06 28-Feb-2011 Jerome Glisse <jglisse@redhat.com> r600g: indentation fixes

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
96bbc627f369c0100b950f81531b1fe9ef586c34 28-Feb-2011 Christian König <deathsimple@vodafone.de> r600g: implement instanced drawing support
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0a17444133e74de7bc5d04d8ffc8f29b89f0cf58 28-Feb-2011 Dave Airlie <airlied@redhat.com> Revert "r600g: Don't negate result of ABS instruction"

This reverts commit b6d40213935da702570eca2c0861bd4b1d7f5254.

This actually breaks gears here on my rv670.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0ab7dcddb35560626c1aab4e8e6181dc4b4703a6 27-Feb-2011 Fabian Bieler <der.fabe@gmx.net> r600g: Process TRUNC with tgis_op2

TRUNC is neither a scalar instruction nor exclusive to the Trans unit.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b6d40213935da702570eca2c0861bd4b1d7f5254 25-Feb-2011 Fabian Bieler <der.fabe@gmx.net> r600g: Don't negate result of ABS instruction

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
69d969e8fafd3357a140072f0f4bbf0f28db9769 17-Feb-2011 Dave Airlie <airlied@redhat.com> r600g: EXT_texture_array support.

This adds EXT_texture_array support to r600g, it passes the piglit
array-texture test but I suspect may not be complete.

It currently requires a kernel patch to fix the CS checker to allow
these, so you need to use R600_ARRAY_TEXTURE=true for now
to enable them.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
077c448d184799e0d9ec962013ec784c6a5c1807 07-Feb-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Add support for relative addressing on constant buffers.

Relative addressing of constant buffers can't work properly through the
kcache, since you can only address within the currently locked kcache window.
Instead, this patch binds the constant buffer as a shader resource, and then
explicitly fetches the constant using a vertex fetch with fetch type
VTX_FETCH_NO_INDEX_OFFSET from the shader. There's probably still some room
for improvement, doing the fetch right before the instruction that needs the
value may not be quite optimal for example.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7687eabaa0470261e059a2d6502628fffd209345 07-Feb-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Split constants in r600_shader_from_tgsi().
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
1fa95c7f9e7f1b63364b1f9c6289690418cf6313 07-Feb-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Do the tgsi_full_src_register to r600_shader_src conversion in r600_shader_from_tgsi().
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a77e813de32643ae2dfffd7ad12abed596172cab 07-Feb-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Split r600_bc_alu_src.

The r600_bc_alu_src structure is used in two different ways, as a vector and
for the individual channels of that same vector. This is somewhat fragile,
and probably confusing.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
3b1c1f02537544a11772b94a8f2e8c3d4c886ca8 07-Feb-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Store literal values in the r600_bc_alu_src structure.

This is much easier to work with, and allows use to get rid of some of the
literal handling hacks.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
80235d92e6f0b2ac7b23d5d41b3f1ad0f12f91f2 07-Feb-2011 Henri Verbeet <hverbeet@gmail.com> r600g: tgsi_dst() can't fail.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d0f2ffad76f58a14d0e85f2b7961f2dbff0d8eeb 07-Feb-2011 Henri Verbeet <hverbeet@gmail.com> r600g: tgsi_src() can't fail.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a6a710cbe7425819e1cd5ad5f2085311c092f2e7 03-Feb-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Make some more things static.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8ca3b140eb53fd8063337a5a2a54a35987d597bc 02-Feb-2011 Christian König <deathsimple@vodafone.de> r600g: use burst exports in shaders

Join multiple exports into just one instruction
instead of exporting each register separately.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5555cd776b970bce020be59193054474a2a63317 31-Jan-2011 Dave Airlie <airlied@redhat.com> r600g: handle the write all cbufs property.

This only works on r600/r700 so far, evergreen doesn't appear
to have the multiwrite enable bit in the color control, so we
may have to actually do a shader rewrite on EG hardware.

remove some duplicate code reg defines also.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a124490262a29d2e873fe50ca57974f246946b85 19-Jan-2011 Christian König <deathsimple@vodafone.de> r600g: fix segfault if texture operand is a literal

This fixes Bug 33262
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9e964baaf34fedec385a750b97fd6684fc52584a 18-Jan-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Kill trailing whitespace.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
495dec0a2bcdff10f9a4024b892501c54e29ef00 18-Jan-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Simplify some r600_bc_add_alu_type() calls to r600_bc_add_alu().
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ac6334145ec8eef42505cdd727aed7fae0831e12 16-Jan-2011 Christian König <deathsimple@vodafone.de> r600d: fix some bugs added reworking literal handling

If a literal slot isn't used it should be set
to 0 instead of an uninitialized value. Also the
channels for pre R700 trig functions were incorrect.
And most important literals were not counted against ndw,
resulting in an invalid force_add_cf detection.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
96f8f8db7bcddec7ef0fce62cf0e23f1c2fb8c8d 22-Dec-2010 Christian König <deathsimple@vodafone.de> r600g: rework literal handling
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c60cb25bfb15fc83e78d9f2c74646dcc5ad07792 16-Dec-2010 Christian König <deathsimple@vodafone.de> r600g: implement output modifiers and use them to further optimize LRP
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7728bef29097c8406d35c6dd969544382abdf935 14-Dec-2010 Christian König <deathsimple@vodafone.de> r600g: use special constants for 0, 1, -1, 1.0f, 0.5f etc
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
dffad730df17983cfaef0808555a8c26cad0aa15 14-Dec-2010 Christian König <deathsimple@vodafone.de> r600g: optimize temp register handling for LRP
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8813842121d46d1be476807c98b0ba0b771f0c91 14-Dec-2010 Christian König <deathsimple@vodafone.de> r600g: optimize away CF_INST_POP

If last instruction is an CF_INST_ALU we don't need to emit an
additional CF_INST_POP for stack clean up after an IF ELSE ENDIF.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
052b9e8fab2e7deddf7f287d63c45aa938e5ec67 12-Jan-2011 Christian König <deathsimple@vodafone.de> r600g: make dumping of shaders an option
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
93a95ad8ff1d543f886f123029d1329513729c4b 12-Dec-2010 Christian König <deathsimple@vodafone.de> r600g: texture instructions also work fine with TGSI_FILE_INPUT
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a1146c1373e66d429afbb92ecb08a6fd67c3e224 14-Dec-2010 Christian König <deathsimple@vodafone.de> r600g: DP4 also supports writemasking
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7be5455796facbe35cf1f1bdbefa83759b2e3b58 12-Dec-2010 Christian König <deathsimple@vodafone.de> r600g: Why all this fiddling with tgsi_helper_copy?

tgsi_helper_copy is used on several occasions to copy a temporary result
into the real destination register to emulate writemasks for OP3 and
reduction operations. According to R600 ISA that's unnecessary.

This patch fixes this use for MAD, CMP and DP4.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
242205404d24f04f9abe1cfa01b9cf0f9e4f9d07 06-Jan-2011 Tilman Sauerbeck <tilman@code-monkey.de> r600g: Fixed SIN/COS/SCS for the case where the operand is a literal.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f39dfa0ab08d1328110afb5ed0ed16a8b5e3fbda 07-Jan-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Update some comments for Evergreen.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
97e2aa31c6e735d5f6bd1d67a4dd8da2605aedc8 07-Jan-2011 Henri Verbeet <hverbeet@gmail.com> r600g: Split ALU clauses based on used constant cache lines.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
876effb0e717e8e64050662f6ffa286c22065f5c 24-Dec-2010 Dave Airlie <airlied@redhat.com> r600g: hack around property unknown issues.

should fix https://bugs.freedesktop.org/show_bug.cgi?id=32619

Need to add proper support for properties later.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
66f55de31e15f97ad1d16c573756738218c02109 15-Dec-2010 Fredrik Höglund <fredrik@kde.org> r600g: fix pow(0, 0) evaluating to NaN

We have to use the non-IEEE compliant version of MUL here, since
log2(0) is -inf, and 0 * -inf is NaN in IEEE arithmetic.

candidates for 7.10 branch
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
69251fc4cd5f71be403e08398bc43d19052a640d 07-Dec-2010 Jerome Glisse <jglisse@redhat.com> r600g: remove dead code

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
afc56b1861c1dae4137493af4c0e6dacc6ee41f9 06-Dec-2010 Jerome Glisse <jglisse@redhat.com> r600g: avoid useless shader rebuild at draw call

Avoid rebuilding constant shader state at each draw call,
factor out spi update that might change at each draw call.
Best would be to update spi only when revealent states
change (likely only flat shading & sprite point).

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
fa86fc564aea4e40c89f6fc889e6a5bf817634b3 04-Dec-2010 Jerome Glisse <jglisse@redhat.com> r600g: build fetch shader from vertex elements

Vertex elements change are less frequent than draw call, those to
avoid rebuilding fetch shader to often build the fetch shader along
vertex elements. This also allow to move vertex buffer setup out
of draw path and make update to it less frequent.

Shader update can still be improved to only update SPI regs (based
on some rasterizer state like flat shading or point sprite ...).

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
44094356149d9a63c197e15f9db344ef2f651d86 05-Dec-2010 Henri Verbeet <hverbeet@gmail.com> r600g: Cleanup fetch shader resources in r600_pipe_shader_destroy().
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
119f00659c03c48cfab0f2770dd6b6fb89af31e4 03-Dec-2010 Jerome Glisse <jglisse@redhat.com> r600g: indentation fix

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
cd431a12bf1f0c47dac6bf10c2d9edb5726fe6fe 03-Dec-2010 Fabian Bieler <der.fabe@gmx.net> r600g: set address of pop instructions to next instruction
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
833f3a488a7ba0fa59e25f1e518f6b4616270143 03-Dec-2010 Jerome Glisse <jglisse@redhat.com> r600g: dump raw shader output for debugging

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
3688301c59d5661d7a5f1473576f2ad1ed575a14 19-Nov-2010 Tilman Sauerbeck <tilman@code-monkey.de> r600g: Removed duplicated call to tgsi_split_literal_constant().

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
07e0424a172970a6ea06e09fe92c1681d8f0f260 23-Nov-2010 Mathias Fröhlich <Mathias.Froehlich@gmx.net> r600g: Only compare active vertex elements

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
04ffbe1ac6a82ac5cce843afa15ffdfa4ef78103 19-Nov-2010 Alex Deucher <alexdeucher@gmail.com> r600g: use full range of VS resources for vertex samplers

Now that we have fetch shaders, the full range of VS resources
can be used for sampling.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4afd0683854ac1cfbe7118232b5e344c83d4b0c2 19-Nov-2010 Alex Deucher <alexdeucher@gmail.com> r600g: use meaningful defines for chiprev

Makes the code much clearer.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
52c66120d8c55d29af6af60f75eb1dc54d9b8062 19-Nov-2010 Alex Deucher <alexdeucher@gmail.com> r600g: translate ARR instruction for evergreen

evergreen variant of:
9f7ec103e26c67cb077fd7d94d2fb68562b86c40
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f609b2ab0342d77a8beca9efb5fbc5b66ff98295 18-Nov-2010 Jerome Glisse <jglisse@redhat.com> r600g: add fetch shader capabilities

Use fetch shader instead of having fetch instruction in the vertex
shader. Allow to restrict shader update to a smaller part when
vertex buffer input layout changes.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7ffd4e976fd11b8c083c2927effd25a2f79ac841 17-Nov-2010 Jerome Glisse <jglisse@redhat.com> r600g: code cleanup (indent, trailing space, empty line ...)

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9f7ec103e26c67cb077fd7d94d2fb68562b86c40 03-Nov-2010 Keith Whitwell <keithw@vmware.com> r600g: translate ARR instruction
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
29c4a15bf61a76cd71ffa5b8f09706d0eab84281 02-Nov-2010 Keith Whitwell <keithw@vmware.com> r600g: propogate resource usage flags to winsys, use to choose bo domains

This opens the question of what interface the winsys layer should
really have for talking about these concepts.

For now I'm using the existing gallium resource usage concept, but
there is no reason not use terms closer to what the hardware
understands - eg. the domains themselves.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f4a2c62af56ce10e43688e8283f8defeb05cef1a 23-Oct-2010 Tilman Sauerbeck <tilman@code-monkey.de> r600g: Also clear bc data when we're destroying a shader.

[airlied: remove unused vars]

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ccb9be105602edaaff196046e324c8cb4a12fe0a 23-Oct-2010 Tilman Sauerbeck <tilman@code-monkey.de> r600g: Added r600_pipe_shader_destroy().

Not yet complete.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
e68c83a5a01a8a659857310cfcc785c7e028d3f0 21-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: initial translate state support
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
89c26866f05dcf8fbb716e38d4780cebcae71653 20-Oct-2010 Vinson Lee <vlee@vmware.com> r600g: Ensure r600_src is initialized in tgsi_exp function.

Silences these GCC warnings.
r600_shader.c: In function 'tgsi_exp':
r600_shader.c:2339: warning: 'r600_src[0].rel' is used uninitialized in this function
r600_shader.c:2339: warning: 'r600_src[0].abs' is used uninitialized in this function
r600_shader.c:2339: warning: 'r600_src[0].neg' is used uninitialized in this function
r600_shader.c:2339: warning: 'r600_src[0].chan' is used uninitialized in this function
r600_shader.c:2339: warning: 'r600_src[0].sel' is used uninitialized in this function
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
98b3f27439ba3a48286ed0d6a4467e5482b41fec 17-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: add evergreen ARL support.

Thanks to Alex Deucher for pointing out the FLT to int conversion is necessary
and writing an initial patch, this brings about 20 piglits, and I think this
is the last piece to make evergreen and r600 equal in terms of features.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
fc6caef4cb67fb13642c5ebccee53019d1764df6 14-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: evergreen interpolation support.

On evergreen, interpolation has moved into the fragment shader,
with the interpolation parmaters being passed via GPRs and LDS entries.

This works out the number of interps required and reserves GPR/LDS
storage for them, it also correctly routes face/position values which
aren't interpolated from the vertex shader.

Also if we noticed nothing is to be interpolated we always setup perspective
interpolation for one value otherwise the GPU appears to lockup.

This fixes about 15 piglit tests on evergreen.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8260ab93461eca3e18f9c17a9ca1961a11372071 14-Oct-2010 Keith Whitwell <keithw@vmware.com> r600g: handle absolute modifier in shader translator

This was being classed as unsupported in one place but used in others.
Enabling it seems to work fine.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
68014c8d19559576d368e158932278df05fe659b 14-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: select linear interpolate if tgsi input requests it
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0637044add50b3a4aee8e915b84c18813c9130f3 14-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: fixup typo in macro name
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
1e82c28fcf76bf79ceb5a1eaf29b3d6d25909ddd 14-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: fixup pos/face ena/address properly
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8a9f02c5d503089bdcc90ff934f6269e59356d52 14-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: only pick centroid coordinate when asked.

TGSI tells us when to use this, its not hooked up from GLSL to MESA to TGSI yet though.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a21a2748beb1f42d21e14858eee9a1323d85a00f 13-Oct-2010 Fredrik Höglund <fredrik@kde.org> r600g: Fix texture sampling with swizzled coords

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
40cc5bfcd70e412289dbb32a1ebca91bf109e1bd 11-Oct-2010 Stephan Schmid <stephan_2303@gmx.de> r600g: fix relative addressing when splitting constant accesses

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
39d1feb51e9dac794751e72f48faf26409a84b1c 06-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: add shader stencil export support.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ef2702fb2003944998ab1578119fb44fe16d1c82 10-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: add TXL opcode support.

fixes glsl1-2D Texture lookup with explicit lod (Vertex shader)
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ea1d818b58d6ff9e4cd0c40eb865beabde8f268c 11-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: enable vertex samplers.

We need to move the texture sampler resources out of the range of the vertex attribs.

We could probably improve this using an allocator but this is the simple answer for now.

makes mesa-demos/src/glsl/vert-tex work.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
51f9cc4759c23b74a2e4d9c79b0a5df27d403f54 07-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: fix Z export enable bits.

we should be checking output array not input to decide.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
84457701b05ef29126d90c2fe72083278d26bd4f 06-Oct-2010 Andre Maasikas <amaasikas@gmail.com> r600g: fix evergreen interpolation setup

interp data is stored in gpr0 so first interp overwrote it
and subsequent ones got wrong values

reserve register 0 so it's not used for attribs.
alternative is to interpolate attrib0 last (reverse, as r600c does)
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d2c06b5037fe9282cbbc0c7acd84a1b286716507 05-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: drop use_mem_constant.

since we plan on using dx10 constant buffers everywhere.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d22a1247d8a709cf433a6dd99b2f87a224c27d88 04-Oct-2010 Jerome Glisse <jglisse@redhat.com> r600g: allow r600_bo to be a sub allocation of a big bo

Add bo offset everywhere needed if r600_bo is ever a sub bo
of a bigger bo.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
294c9fce1b924beddf198a3cce738b88eabb5537 04-Oct-2010 Jerome Glisse <jglisse@redhat.com> r600g: rename radeon_ws_bo to r600_bo

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6dc051557d99e81fc58e09edf21f185874dc1979 04-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: the code to check whether a new vertex shader is needed was wrong

this code was memcmp'ing two structs, but refcounting one of them afterwards,
so any subsequent memcmp was never going to work.

again this stops unnecessary uploads of vertex program,
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
20846a8ce102aa2bc6d3f1e907d490940c0d0a69 02-Oct-2010 Vinson Lee <vlee@vmware.com> r600g: Remove unused variable.

Fixes this GCC warning.
r600_shader.c: In function 'tgsi_split_literal_constant':
r600_shader.c:818: warning: unused variable 'index'
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
738aa29289296512959cbb37d8602131dae44dab 01-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: setup basic loop consts on r600 + evergreen.

this sets up a single loop constant like r600c does.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7777c997e0f4cf75ff292f34a5a64ee2834c0f26 01-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: only set the Z export if shader exports it.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
e973221538d5edfad62abedf5b37a4fb774d71fc 01-Oct-2010 Dave Airlie <airlied@redhat.com> r600g: add assembler support for other vtx fetch fields.

this shouldn't change behaviour, just push the choice of what
to do out to the shader.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9d4ae914e28ac7857a32a88ba27aecc182f697c6 30-Sep-2010 Jerome Glisse <jglisse@redhat.com> r600g: fix constant & literal src splitting, also fix mplayer gl2 shader

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
dbcd6526021c50770c3e5e04b04dc64c70298124 30-Sep-2010 Dave Airlie <airlied@redhat.com> r600g: clean up some code from move to new paths.

mainly remove 2 suffix from function names
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6abd7771c6ab2c733b20835e211060dd18fd847d 29-Sep-2010 Jerome Glisse <jglisse@redhat.com> r600g: more cleanup

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
1235becaa1cf7e29f580900592563c3329d326de 29-Sep-2010 Jerome Glisse <jglisse@redhat.com> r600g: cleanup

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9c284b5cae916a083d17d1039d2f2da128b47882 29-Sep-2010 Jerome Glisse <jglisse@redhat.com> r600g: delete old path

Lot of clean can now happen.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
84b2773f00161441c4fe06ce6dbf979c5ce78dae 26-Sep-2010 Vinson Lee <vlee@vmware.com> r600g: Silence uninitialized variable warnings.

Fixes these GCC warnings.
r600_shader.c: In function 'tgsi_tex':
r600_shader.c:1611: warning: 'src2_chan' may be used uninitialized in this function
r600_shader.c:1611: warning: 'src_chan' may be used uninitialized in this function
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
59276b8541049a2d07d32fbb139fb14e21e387fc 24-Sep-2010 Dave Airlie <airlied@redhat.com> r600g: fixup VP->FP output->input routing.

We need to map the TGSI semantics to each other using the hw semantic ids.

this fixes glsl-kwin-blur and glsl-routing.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
894a307a91d6437ec418800952da2ec174e092f5 21-Sep-2010 Tilman Sauerbeck <tilman@code-monkey.de> r600g: Removed debug code.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0f099f2906773690210661fb533e207626dc8e40 20-Sep-2010 Jerome Glisse <jglisse@redhat.com> r600g: use pipe context for flushing inside map

This allow to share code path btw old & new, also
remove check on reference this might make things
a little slower but new design doesn't use reference
stuff.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ef419599d9b18de2a9077c5f0a7f02bfc11d1762 20-Sep-2010 Tilman Sauerbeck <tilman@code-monkey.de> r600g: Implemented the Z and W component write for the SCS opcode.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
57bf96b43be2abcbadc387d7b5466b772125a093 19-Sep-2010 Tilman Sauerbeck <tilman@code-monkey.de> r600g: Honour destination operand's writemask in the SCS implementation.

If we are not going to write to the X or Y components of the destination
vector we also don't need to prepare to compute SIN or COS.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7e5173d065f0da450cf553e3e3084a0f774919a3 20-Sep-2010 Dave Airlie <airlied@redhat.com> r600g: add missing BC_INST wrapper for evergreen
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
07b9e22a1f587026672a00a31cebaef5aae964c6 20-Sep-2010 Corbin Simpson <MostAwesomeDude@gmail.com> r600g: Fix false and true.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c5edfcc410bdf3dbe4f37418de8f0009746c9578 19-Sep-2010 Dave Airlie <airlied@redhat.com> r600g; add uses waterfall to asm cf for r6xx.

On r6xx if an MOVA instruction is emitted we should set this bit.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7c1fcc41be15b6d648f84c8c1870a3a00575a48f 16-Sep-2010 Dave Airlie <airlied@redhat.com> r600g: move constant buffer creation behind winsys abstraction.

this paves the way for moving to pb bufmgrs now.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f70f79f6f6027bdf2f7de09bb39e12a24420f338 16-Sep-2010 Dave Airlie <airlied@redhat.com> r600g: attempt to abstract kernel bos from pipe driver.

introduce an abstraction layer between kernel bos and the winsys BOs.

this is to allow plugging in pb manager with minimal disruption to pipe driver.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
df62338c491f2cace1a48f99de78e83b5edd82fd 10-Sep-2010 Tilman Sauerbeck <tilman@code-monkey.de> r600g: Use clamped math for RCP and RSQ.

This is likely only correct for OpenGL and not other state trackers.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
e0b6df4fcce0964ea7930efeb40cb487b4c53337 15-Sep-2010 John Doe <glisse@localhost.localdomain> r600g: misc cleanup

Avoid using r600_screen structure to get ptr to radeon
winsys structure.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a712e193a3f58f4f40402c34adf16de255afa760 15-Sep-2010 Vinson Lee <vlee@vmware.com> r600g: Silence uninitialized variable warning.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
96a4edb8ccb4bc1125918b972e8b3a080f496d0d 08-Sep-2010 Tilman Sauerbeck <tilman@code-monkey.de> r600g: Implemented the y component write for the LOG opcode.

This makes the 'vp1-LOG test' piglit test work.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
50526e094f4c66957c7f74c190c35903bc82fb62 03-Sep-2010 Dave Airlie <airlied@redhat.com> r600g: add initial evergreen support

adds shader opcodes + assembler support (except ARL)
uses constant buffers
add interp instructions in fragment shader
adds all evergreen hw states
adds evergreen pm4 support.

this runs gears for me on my evergreen
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
1e28dd4ebe73f85cdc38a6bdaeef23fd10223cf3 07-Sep-2010 Tilman Sauerbeck <tilman@code-monkey.de> r600g: Added missing r600_bc_add_literal() calls to XPD implementation.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
460c5304aba646143938b76d536a6fc13a302ca8 07-Sep-2010 Tilman Sauerbeck <tilman@code-monkey.de> r600g: Added preliminary support for the LOG opcode.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
42c966bc496d4049d98eb1d45dd7bb0b55fa41bd 07-Sep-2010 Tilman Sauerbeck <tilman@code-monkey.de> r600g: Added missing abs-ification to RSQ.

This makes the 'fp1-RSQ test 2' piglit test work.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a3a94554f5a12f0626d9712ddcdc81b1e21d36c2 08-Sep-2010 Dave Airlie <airlied@redhat.com> r600g: split opcodes out and add wrapper around usage.

This splits the r600 opcodes out of the sq file and adds a wrapper
so we can convert to evergreen opcodes later without touching these functions
too much.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d42efb9e8df6ef872ab4f142e3daf1b6cb9eff11 08-Sep-2010 Dave Airlie <airlied@redhat.com> r600g: add support for constants in memory buffers.

DX9 constants were in the constant file, and evergreen no longer support
cfile. r600/700 can also use constants in memory buffers, so add the code
(disabled for now) to enable that as precursor for evergreen.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9ef1c51be16ea360481cf9f82ebb1e3eb01efb18 08-Sep-2010 Dave Airlie <airlied@redhat.com> r600g: abstract the hw states out behind a vtbl.

this is step one towards evergreen support, it lets us plug in whole
new hw level states.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5d5f693cefe452bd8bd7e45f8b5d7ed991ae5115 02-Sep-2010 Dave Airlie <airlied@redhat.com> r600g: fix thinko in shadow code.

spotted by taiu on irc
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
67234b4b42a8285a9b14da48dd113cbe2ee871fd 02-Sep-2010 Jerome Glisse <jglisse@redhat.com> r600g: refix db/cb state

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
66e4cb1cd5a55402606a09417349d2be8b009e89 30-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: avoid dynamic allocation of states

Make state statically allocated, this kills a bunch of code
and avoid intensive use of malloc/free. There is still a lot
of useless duplicate function wrapping that can be kill. This
doesn't improve yet performance, needs to avoid memcpy states
in radeon_ctx_set_draw and to avoid rebuilding vs_resources,
dsa, scissor, cb_cntl, ... states at each draw command.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
bea5f559a6f52e8fb7c32ee8e9f9c5f04c05b582 01-Sep-2010 Dave Airlie <airlied@redhat.com> r600g: fix glean texCube and shadows.

add cube and shadow support to the texture code.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b87b6e5bf798fcfa486e8082a09b4425a40cf3c4 31-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: fix up depth write swizzles.

For some reason r600c, emits extra instructions in the FP to do the depth write output swizzle,
I'm not sure this is required, so here I'm doing it in the exports.

this fixes the mesa trivial demos tri-depthwrite and tri-depthwrite2, it doesn't fix
the glsl1 gl_FragDepth writing test however.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ad202678fc4859b51a9198575a886707f57ad05b 31-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: fix fp-fragment-position test.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
580781babe99bbfd0181b911e1e53e94728faa04 31-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: fix typo in last commit
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5d66a8606d68caf0fb4754c144c5fb7d87fbf7df 31-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: fix position input to fragment shader.

this fixes a few if the fs shader tests, 10 more piglits
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4e61f085d04c5d182989c6cb388c375b007e6b76 31-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: remove unneeded function call from scs
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d3fa92584b109bf59dce32501eec73f8de74f42b 31-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: make LIT work properly

this is a bit of a workaround, something is wrong with the literal emits here
so we just use the trig copy function to copy the immd to a temp at start of op.

fix VP/FP LIT tests
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
be7816f2b7f0b064a47fb3f101477ad5dba74017 31-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: fixup trig functions when input is a literal

So as the trig functions used up the literal spots for the PI work, if the arg0 was an immediate
we'd hit failure, so copy the literal before starting.

add some tracking of max temp used to avoid trashing temp regs.

5 more piglits, fp1 COS,SCS,SIN tests
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ee0153f891bb75ee14db579e6628d592032d6801 31-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: make sure LIT splits constants
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9bbc54a10d225679a180a085f7ca5bb88ee2bd15 31-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: fix constant splitting

constant splitting was broken for multi-constant cases, fixes fp1 CMP+MAD, vp1 CMP.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
85e401d8bfd80450a31eac234e13008e33e64227 31-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: fix LIT tests
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5ea238b7991331c854e66a16911d616d36965dc9 31-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add missing literals

Also add an error if we hit this problem again, we need to do this better
possibly tying the literal addition to the last flag.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
69c30f5d6d429be4f7e211867984dab1a33da79c 26-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: fixup states generation in winsys.

The current states code had an unhealthy relationship between
that had to somehow magically align themselves, editing either
place meant renumbering all states after the one you were on,
and it was pretty unapproachable code.

This replaces the huge types structures with a simple type + sub
type struct, which is keyed on an stype enum in radeon.h. Each
stype can have a per-shader type subclassing (4 types supported,
PS/VS/GS/FS), and also has a number of states per-subtype. So you
have 256 constants per 4 shaders per one CONSTANT stype.

The interface from the driver is changed to pass in the tuple,
(stype, id, shader_type), and we look for this. If
radeon_state_shader ever shows up on profile, it could use a
hashtable based on stype/shader_type to speed things up.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
57eecbbf6c57fbf5a46b8b81d8d4fbb6bd78ea12 30-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add DST opcode support.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
92f5c7a597aaf098f4e6b4793e4b89ae539e328a 30-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add SCS support.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
db92a03aacc0c0e13377af4f54ef5303400b4810 30-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: fix warning introduced by last commit.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
47d5a19df1e7760c4f5f0e340bfc56355c2e428b 30-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add initial relative support to assembler

passes another ~20 piglits.

/me starts to run out low hanging fruit around now.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4502b17901ad491e0598ee59a12d372c008ae03b 30-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add KILP support

passes glsl1-discard tests
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
cb08b9fa84bf432dcca2e685daadd2df651b3025 30-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: fix SSG and op3 neg writing

8 more piglits, mainly the two SSG tests.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
09547e1bcee7df3444dd8682770d1b31da1a5822 27-Aug-2010 Dave Airlie <airlied@redhat.com> r600g : add basic loop support.

Adds BGNLOOP, BRK, CONT, ENDLOOP support, ported from r600c.

17 piglits more on r300g.tests.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
cd4bd4fb53f82361480f388923ef9e2fa7379d68 29-Aug-2010 Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> r600g: use the values from the correct literals

Created an array for literals as we should not always use the last declared literal.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
e77b1e777d585254db62e872a74e23351bb36f85 29-Aug-2010 Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> r600g: added literals where needed for POW instruction

Fixes size calculation for the bytecode buffer.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2184f3ec3059eaf8a9a2b04c995162543f000862 27-Aug-2010 Dave Airlie <airlied@redhat.com> Revert "r600g: simplify states"

This reverts commit bd25e23bf3740f59ce8859848c715daeb9e9821f.

Apart from introducing a lot of hex magic numbers and being highly impenetable code,
it causes lots of lockups on an average piglit run that always runs without lockups.

Always run piglit before/after doing big things like this.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a03d456f5a41926e39194de70b2d50776e64b8a2 25-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add initial if/else/endif support

this adds handling for some more CF instructions and conditions
also adds parameter for stack size emission

These seem to pass on VS with the stack size hack but not on FS,

TODO: fix FS + stack size calcs
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d8fb13bae30b6ff214c5d5158b9bcaf430f56b43 25-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: optimise op2 and swapped op2 emission.

this makes op2 emission smaller, since it skips instructions
that don't write to the dst. not sure if this could have unwanted
side effects but try it and see.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
36d91be75ea9b79878fdf4b789ea022d781e87f4 24-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add exp support in theory.

though it isn't passing the test, and this instruction is pure bonghits.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
e57437ccd6814ffd4534fd46512afeb0b9e06eed 24-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add DPH support.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
bd25e23bf3740f59ce8859848c715daeb9e9821f 24-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: simplify states

Directly build PM4 packet, avoid using malloc (no states are
bigger than 128 dwords), remove unecessary informations,
remove pm4 building in favor of prebuild pm4 packet.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0e6a02d29915db2ca460206656ab517ddaf0b455 24-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add XPD support

ported from r600c.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
87f44d5723ebb3a2efe0dddc1a6edb6536adea4d 24-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add CMP support.

ported from r600c, fixes fp-cmp, glsl1-sqrt*
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
bcf7f66a934ebd9c91da90d6e1f9b169c33c746c 23-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: export one component per pixel + r7xx uncompression shader

We need to always at least export one component (wether it's depth
or color. Add valid r7xx shader program for depth decompression.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ed99c28d12579bb8ee79eb9cfa55452785be7b6e 22-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: depth buffer likely needs decompression when used as texture

Before using depth buffer as texture, it needs to be decompressed
(tile pattern of db are different from one used for colorbuffer
like texture)

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
36efb86c0570d86d8dfce87fd2416125e0e91b40 22-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: partialy fix texturing from depth buffer + initial support for untiling

Partialy fix texturing from depth buffer, depth buffer is tiled
following different tile organisation that color buffer. This
properly set the tile type & array mode field of texture sampler
when sampling from db resource.

Add initial support to untiling buffer when transfering them,
it's kind of broken by corruption the vertex buffer of previous
draw.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
a4b10a56145ea253def4cf958410d770d0640bc9 20-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: add POW instruction

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
921c987c6f43b4d63a98b61013d43bac97baff21 20-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: cleanup definition, fix segfault when no valid pixel shader

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
076c53879b90855ecf38602584f22e4ab6db7569 19-Aug-2010 Alex Deucher <alexdeucher@gmail.com> r600g: update comments about ALU src operands
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
88f5976484842671ecb2cefcfa91838a43032359 19-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add sin/cos

This pretty much ports the code from r600c, however it doesn't
always seem to work quite perfectly, but I can't find anything in this
code that is wrong. I'm guessing either literal input or constants
aren't working always.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0d48925a56ad4fb253386110b545abda82a25464 19-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add SSG, SEQ, SGT and SNE
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
3af87162cd0d3107cb2af0812ce4e4680b177725 18-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add FRC, FLR, DDX and DDY

the first two are straight op2's and the DDX/DDY are taken from r600c.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
be288c3505429811adc2743c1be2c1971f4483a2 18-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add SGE and SLE opcodes

fixes fp-set-01 and glsl-fs-step
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
d01c0025e81e713d99f4de9ed7f4cdd12a1d08b5 18-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add TXB support

fixes biased texturing tests
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b777db32541b360516203865a0fa41f4b8cebf7c 18-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: fix TXP vs TEX in shader.

Don't do perspective for TEX, and also copy input to a temporary for TEX

also add tex opcode names
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4558b634556f42867449a6e60d4badc72099f10d 18-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: add two simple tgsi opcodes.

makes glsl-fs-log2 and glsl1-integer division with uniform var pass
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
608f749ec3fc655d3e67e572fa2e256a42c16878 17-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: fix fake pixel output

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
481b65abaedb271d0da24c75b8c60f7bcf6d8ce9 11-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: accept empty frag prog shader

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
1bb0427a856ffa3fea1b177ea5b0395a00de3833 11-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: add src negation support

Should fix few glBitmap cases.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
457378e031ffb89a2011604c7798a6f5f2142207 11-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: add point/sprite rendering support

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b474478f206c6d81af78696d3d5ce156d4d413d7 06-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: really fix multi target support

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c3ad060488ffd98f1c6dc9127b46324c5201f434 06-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: finish multi target rendering support

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6e6103004c9c737297b842a4aff298da920e7c33 06-Aug-2010 Jerome Glisse <jglisse@redhat.com> Revert "r600g: don't use dynamic state allocation for states"

This reverts commit 9c949d4a4dd43b7889e13bdf683bcf211f049ced.

Conflicts:

src/gallium/drivers/r600/r600_context.h
src/gallium/drivers/r600/r600_draw.c
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/r600/r600_state.c
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5f6ab5e259de826bb3795d90fdb0235c8997acb9 06-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: start to fix up multiple targets.

fixup exports from pixel shader for multi-cbs + depth buffer writing.

Still crashes GPU running any of the multi-buffer or depth writing
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9c949d4a4dd43b7889e13bdf683bcf211f049ced 04-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: don't use dynamic state allocation for states

Simplify state handly by avoiding state allocation.
Next step is to allocate once for all context packet
buffer and then avoid rebuilding pm4 packet each time
(through use of combined crc) this would also avoid
number of memcpy.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9a78e790dc4c40362b971ad5eff2505c02b73ed7 04-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: always perform texture perspective divide + fix blending

quake3 engine seems to run fine at this point (ioquake)

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
dd863bf5e7c6680075cf7c355a026b1da69ee9e3 03-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: add polygon offset support

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7e42b7e5d2aebcda0e6bf081b6661411731e6df2 03-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: fix LIT + fix multiple constant one ALU + fix ALU block splitting

Make sure LIT fills all slot for instruction (can't do W instruction
without having the Z slot filled with at least a NOP).

ALU instruction can't access more than 4 constant, move constant to
temporary reg if we reach the limit.

Fix ALU block splitting, only split ALU after ALU with last instruction
bit sets.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
f031817450fe75d3224f767d79938813287ac445 02-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: split alu block to conform to limit + RCP opcode

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
313df4156279f84ebc5b98a7540820b994762650 02-Aug-2010 Jerome Glisse <jglisse@redhat.com> r600g: add autogenerated reg definition + debug print cleanup

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
01984cf34fa4e6d564d06a126795468b5718ecb0 02-Aug-2010 Dave Airlie <airlied@redhat.com> r600g: set correct tex coord type for rect textures.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
094d66f45992830929d620782c70836b4b9b4a37 30-Jul-2010 Jerome Glisse <jglisse@redhat.com> r600g: add KIL opcode support

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6c288d06ac512be6eb7f19a9005389dd46d5a26a 30-Jul-2010 Jerome Glisse <jglisse@redhat.com> r600g: fix typo in tex instruction + shader semantic id fix

It seems we never get semantic id from TGSI so fallback
to use output number as id.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
7a73390f9126fd270d9891cd9d2bf38ef56d9b80 29-Jul-2010 Jerome Glisse <jglisse@redhat.com> r600g: mipmap early support + EX2/ABS instruction + culling

Add mipmap support (demos/src/redbook/mipmap is working)
Add EX2/ABS shader instruction support.
Add face culling support.

Misc fixes.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
35e044ab562b65aa53f9d9d7b5885e6a887774bb 29-Jul-2010 Jerome Glisse <jglisse@redhat.com> r600g: switch btw flat/linear interpolation

I am not sure how to properly handle flat shading regarding
non color parameter to fragment shader. It seems we should
still interpolate non color using linear interpolation and
flat shade only apply to color.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6f0f6c64596b7bbbfa96e8af6715565e37efa91e 29-Jul-2010 Jerome Glisse <jglisse@redhat.com> r600g: split pipe state creating/binding from hw state creation

Split hw vs pipe states creation handling as hw states group doesn't
match pipe state group exactly. Right now be dumb about that and
rebuild all hw states on each draw call. More optimization on that
side coming.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
b346c4205dc19c9ffbff48ed8bd89687772a96f8 28-Jul-2010 Jerome Glisse <jglisse@redhat.com> r600g: add lrp instruction support

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9961a0b92de7afed2afec62dadad08d76d1d3374 28-Jul-2010 Jerome Glisse <jglisse@redhat.com> r600g: actualy fix the literal emission

Previous patch added literal emission to wrong place, we
want to emit literal before emitting a new alu group.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
641c9adb09e8707f659d42be600d16902ebf8895 28-Jul-2010 Jerome Glisse <jglisse@redhat.com> r600g: texture support

Add texture mapping support, redbook/texbind works if
you comment out glClear and second checkboard. Need to
fix :
- texture overwritting
- lod & mip/map handling
- unormalized coordinate handling
- texture view with first leve > 0
- and many other things

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
6a20539580e1b7ae921d497fbf66a8fd545efea4 28-Jul-2010 Vinson Lee <vlee@vmware.com> r600g: Move declaration before code.

Fixes SCons build.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
2b3b76a4a0e21eb4bd4f1a4da5ff6ed26ccbabd1 27-Jul-2010 Jerome Glisse <jglisse@redhat.com> r600g: always emit literal after emiting an alu instruction

Make sure we always fill in the literal after alu instruction.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
0bebdc230ff09f191cfa269c2cbcbb257fd2e0fc 26-Jul-2010 Stephan Schmid <stephan_2303@gmx.de> r600g: implememt the LIT instruction
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
33241134e6e3d5bf19141eceff90fd854b23386a 24-Jul-2010 Jerome Glisse <jglisse@redhat.com> r600g: first pass at texture support

This add texture support to the assembler, generated code is
wrong (tested against working dump).

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
cf864fd58b2a4780482a108cd3ff86779e8fa965 24-Jul-2010 Jerome Glisse <jglisse@redhat.com> r600g: fix dp2, dp3, dp4 tokens

We need to make sure dp are all mirror accross the alu unit.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
5cc2974dff346f3fa53881dbcc158e4563915487 23-Jul-2010 Jerome Glisse <jglisse@redhat.com> r600g: add RSQ token support

Could serve as an example on how to add more token
support.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
de553d906b4a205d811a9e1651f14212ec284e29 23-Jul-2010 Jerome Glisse <jglisse@redhat.com> r600g: drop compiler stuff and switch over dumb tgsi assembler

Writing a compiler is time consuming and error prone in
order to allow r600g to further progress in the meantime
i wrote a simple tgsi assembler, it does stupid thing but
i would rather keep the code simple than having people
trying to optimize code it does.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
4b2820534e3635a8ecd047f1e0139834e0a67d02 21-Jul-2010 Dave Airlie <airlied@redhat.com> r600g: add r600 compile mode to compiler.

some of the ALU instructions are different on r6xx vs r7xx,
separate the alu translation to separate files, and use family
to pick which compile stage to use.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
62f8b56dc6bcc13a30ed4f8c2d71e5a139b57b33 20-Jul-2010 Jerome Glisse <jglisse@redhat.com> r600g: split trans unit computation

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
8556b77c56f3f1f0e75ce46d6b5c0d84c7b4eabd 02-Jul-2010 Dave Airlie <airlied@redhat.com> r600: use gallium list macros instead of making our own.

before this change, r600 glxinfo segfaulted in the list code, and I wasn't
debugging another linked list implementation, its 2010 after all.

So add the two missing list macros to the gallium header from X.org list header file (after fixing them), then port all r600 lists to the new header.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
c6131879eb7dfdf26cd068109f6680608d608ab4 06-Jun-2010 Jerome Glisse <jglisse@redhat.com> r600g: add shader literal constant support

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
ffd0a2e215d83222f5e1e148b8e7cddeac6025d2 04-Jun-2010 Marek Olšák <maraeo@gmail.com> r600g: use cast wrappers
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
1202f17063dd568d406c04b62307efad909c5917 31-May-2010 Vinson Lee <vlee@vmware.com> r600g: Remove unnecessary headers.
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
9e8a6f801d360f85cc7bb53b85f15129b07b26da 19-May-2010 Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> r600g: various fixes

- enabled flushing a buffer more than once
- enabled the blitter for r600_clear
- added some more colors to r600_is_format_supported (copied from r600_conv_pipe_format)
- r600_set_framebuffer_state now sets rctx->fb_state
- more states are saved before a blit (had to add some accounting for the viewport and the vertex elements state)
- fixed a few errors with reference counting
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c
72128962d640846472c1b0dc22cf4ac6ce875dc9 08-May-2010 Jerome Glisse <glisse@freedesktop.org> r600g: Initial import
/external/mesa3d/src/gallium/drivers/r600/r600_shader.c