aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_shader.h
Commit message (Collapse)AuthorAgeFilesLines
* r600: add cull distance supportDave Airlie2017-11-211-0/+2
| | | | | | This passes all the tests in piglit. Signed-off-by: Dave Airlie <[email protected]>
* r600: handle image size support.Dave Airlie2017-11-171-0/+2
| | | | | | | | This adds support for the RESQ opcode with the workaround required due to hw bugs for buffers and cube arrays. Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: add core pieces of image support.Dave Airlie2017-11-171-0/+1
| | | | | | | | | This adds the atoms and gallium api implementations, along with support for compress/decompress paths for shader images. Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600/shader: add flag to denote if shader uses imagesDave Airlie2017-11-171-0/+1
| | | | | Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: add gs tri strip adjacency fix.Dave Airlie2017-11-141-1/+2
| | | | | | | | | | | | | | Like radeonsi: generate GS prolog to (partially) fix triangle strip adjacency rotation evergreen hw suffers from the same problem, so rotate the geometry inputs to fix this. This fixes: ./bin/glsl-1.50-geometry-primitive-types GL_TRIANGLE_STRIP_ADJACENCY on evergreen. Signed-off-by: Dave Airlie <[email protected]>
* r600: add support for hw atomic counters. (v3)Dave Airlie2017-11-101-0/+19
| | | | | | | | | | | | | | | | This adds support for the evergreen/cayman atomic counters. These are implemented using GDS append/consume counters. The values for each counter are loaded before drawing and saved after each draw using special CP packets. v2: move hw atomic assignment into driver. v3: fix messing up caps (Gert Wollny), only store ranges in driver, drop buffers. Signed-off-by: Dave Airlie <[email protected]> Acked-by: Nicolai Hähnle <[email protected]> Tested-By: Gert Wollny <[email protected]>
* r600g: take into account offset to system inputs at tgsi_interp_egcm()Constantine Charlamov2017-06-261-2/+3
| | | | | | | | | Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100785 v2: I was too much twiddling whether to initialize nsys_inputs at the beginning of shader initialization or for allocation of system values, and by the time I decided to go with the first one, I forgot to change it back. Signed-off-by: Constantine Kharlamov <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600/shader: increase number of inputs/outputs to 64.Dave Airlie2015-12-071-2/+2
| | | | | | Tessellation exceeds these sometimes, so increase them for now. Signed-off-by: Dave Airlie <[email protected]>
* r600: port over the get_lds_unique_index from radeonsiDave Airlie2015-12-071-0/+1
| | | | | | On r600 this needs to subtract 9 due to texcoord interactions. Signed-off-by: Dave Airlie <[email protected]>
* r600: add shader key entries for tcs and tes.Dave Airlie2015-12-071-0/+20
| | | | | | | 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 <[email protected]>
* r600g: Pass conservative depth parameters to hwGlenn Kennard2015-11-111-0/+2
| | | | | | | | Supported on R700 and up. Signed-off-by: Glenn Kennard <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* Revert "r600g: Pass conservative depth parameters to hw"Dave Airlie2015-11-111-2/+0
| | | | | | This reverts commit a1fc78911e9a6439db94d6ae91d5672c76e5fb1c. I pushed the wrong patch.
* r600g: Pass conservative depth parameters to hwGlenn Kennard2015-11-111-0/+2
| | | | | | | Supported on R700 and up. Signed-off-by: Glenn Kennard <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g/sb: SB support for UBO indexingGlenn Kennard2015-10-131-2/+0
| | | | | Signed-off-by: Glenn Kennard <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g/sb: Support gs5 sampler indexing (v2)Glenn Kennard2015-10-131-2/+2
| | | | | | | [airlied: v2 cayman fixups] Signed-off-by: Glenn Kennard <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: add doubles support for CAYMANDave Airlie2015-09-021-0/+2
| | | | | | | | | | | | | | | | 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 <[email protected]>
* r600g: add multiple stream support for geom shadersGlenn Kennard2015-09-021-2/+3
| | | | | | | | | | | | 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 <[email protected]>
* r600g: Move geometry properties state from shader to selectorEdward O'Callaghan2015-08-301-4/+0
| | | | | Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600g: Remove dead assigment to 'gs_input_prim' in shader stateEdward O'Callaghan2015-08-301-1/+0
| | | | | | | | 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 <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600: Turn 'r600_shader_key' struct into unionEdward O'Callaghan2015-08-211-8/+12
| | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon: add support for streams to the common streamout code. (v2)Dave Airlie2015-07-291-0/+1
| | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* Fix invalid extern "C" around header inclusion.Mark Janes2015-03-051-0/+12
| | | | | | | | | | | System headers may contain C++ declarations, which cannot be given C linkage. For this reason, include statements should never occur inside extern "C". This patch moves the C linkage statements to enclose only the declarations within a single header. Reviewed-by: Jose Fonseca <[email protected]>
* r600g: add support for primitive id without geom shader (v2)Dave Airlie2015-01-281-0/+4
| | | | | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: Implement sm5 UBO/sampler indexingGlenn Kennard2014-10-281-0/+2
| | | | | | | | | 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 <[email protected]>
* r600g: Implement GL_ARB_sample_shadingGlenn Kennard2014-10-121-1/+5
| | | | | | | | Also fixes two sided lighting which was broken at least on pre-evergreen by commit b1eb00. Signed-off-by: Glenn Kennard <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600g: Implement sm5 geometry shader instancingGlenn Kennard2014-09-011-0/+1
| | | | | | Requires Evergreen or later hardware. Signed-off-by: Glenn Kennard <[email protected]>
* r600g: use TGSI_PROPERTY to disable viewport and clippingChristoph Bumiller2014-06-021-0/+1
| | | | | | | | | | 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 <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600g: implement edge flagsMarek Olšák2014-03-041-0/+1
| | | | | Cc: [email protected] Reviewed-by: Alex Deucher <[email protected]>
* r600g: add support for multiple viewports.Dave Airlie2014-02-111-0/+1
| | | | | | tested on rv635 and barts. Signed-off-by: Dave Airlie <[email protected]>
* r600g: initial VS output layer supportDave Airlie2014-02-051-0/+1
| | | | | | | This just adds support for emitting the proper value in the VS out misc. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: add primitive input support for gsDave Airlie2014-02-051-0/+1
| | | | | | | only enable prim id if gs uses it Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: initial support for geometry shaders on evergreen (v2)Vadim Girlin2014-02-051-0/+12
| | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: increase array size for shader inputs and outputsMarek Olšák2013-05-101-2/+2
| | | | | | | and add assertions to prevent buffer overflow. This fixes corruption of the r600_shader struct. NOTE: This is a candidate for the stable branches.
* r600g: plug in optimizing backendVadim Girlin2013-04-301-0/+11
| | | | | | Optimization is enabled with "R600_DEBUG=sb". Signed-off-by: Vadim Girlin <[email protected]>
* r600g: remove deprecated state management codeMarek Olšák2013-03-111-1/+0
| | | | | | It's nice to see so much code that did pretty much nothing go away. Reviewed-by: Jerome Glisse <[email protected]>
* r600g: atomize vertex shaderMarek Olšák2013-03-111-0/+1
| | | | Reviewed-by: Jerome Glisse <[email protected]>
* r600g: improve inputs/interpolation handling with llvm backendVadim Girlin2013-01-281-1/+2
| | | | | | | | | | 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 <[email protected]> Signed-off-by: Vadim Girlin <[email protected]>
* r600g: texture buffer object + glsl 1.40 enable support (v2)Dave Airlie2013-01-111-0/+1
| | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* r600g: add initial cube map array support (v2)Dave Airlie2012-11-101-0/+1
| | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: move shader structures into r600_shader.hMarek Olšák2012-10-121-0/+21
|
* r600g: frontcolor tracks its associated backcolorVincent Lejeune2012-10-091-0/+1
| | | | Reviewed-by: Tom Stellard <[email protected]>
* r600g: add clip_misc_state for clip registers emitted in draw_vboMarek Olšák2012-09-131-1/+0
| | | | Reviewed-by: Jerome Glisse <[email protected]>
* r600g: avoid unnecessary shader exports v2Vadim Girlin2012-06-271-1/+6
| | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Jerome Glisse <[email protected]>
* r600g: use a more clever way to disable per-vertex point sizeMarek Olšák2012-01-311-0/+1
| | | | | | | | This uses point size clamping to force point size to a particular value, making the vertex shader output irrelevant. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: nuke the fallback for vertex and fragment color clampingMarek Olšák2012-01-251-1/+0
|
* r600g: implement clip distancesVadim Girlin2012-01-151-0/+6
| | | | | Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: implement two-sided lighting (v3)Vadim Girlin2012-01-151-0/+1
| | | | | | | | | v2: select the colors in the pixel shader v3: fix rs state creation for pre-evergreen Signed-off-by: Vadim Girlin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: precalculate semantic indices for SPI setupVadim Girlin2011-11-051-1/+1
| | | | | | | | | | 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 <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* Revert "r600g: precalculate semantic indices for SPI setup"Alex Deucher2011-11-041-1/+1
| | | | | | This reverts commit c15f8569fddac5f8aee77863922fd5bb992cfe8a. This breaks r6xx.
* r600g: precalculate semantic indices for SPI setupVadim Girlin2011-11-041-1/+1
| | | | | | | | | 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 <[email protected]>