aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_state_common.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix a few typosZoë Blade2015-04-271-2/+2
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* r600g,radeonsi: cleanup of hex literalsMarek Olšák2015-02-241-1/+1
| | | | | | | | 0x3F800000 -> fui(1.0) 0x00000000 -> 0 Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* r600g: Implement GL_ARB_draw_indirect for EG/CMGlenn Kennard2015-02-241-23/+105
| | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600g: add support for primitive id without geom shader (v2)Dave Airlie2015-01-281-0/+5
| | | | | | | | | | | | | | | | | | | 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: move selecting the pixel shader earlier.Dave Airlie2015-01-281-3/+4
| | | | | | | | | | | In order to detect that a pixel shader has a prim id input when we have no geometry shader we need to reorder the shader selection so the pixel shader is selected first, then the vertex shader key can take into account the primitive id input requirement and lack of geom shader. Reviewed-by: Glenn Kennard <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: fix fallout from last patchDave Airlie2014-11-271-1/+0
| | | | | | | | | | | | | | | I accidentally rebased from the wrong machine and missed some fixes that were on my r600 box. doh. this fixes a bunch of geom shader textureSize tests on rv635 from gpu reset to pass. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86760 Reported-by: [email protected] Cc: "10.4 10.3" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: merge the TXQ and BUFFER constant buffers (v1.1)Dave Airlie2014-11-271-55/+41
| | | | | | | | | | | | | | | 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 <[email protected]> Cc: "10.4 10.3" <[email protected] Signed-off-by: Dave Airlie <[email protected]>
* r600g: Implement sm5 interpolation functionsGlenn Kennard2014-10-281-0/+3
| | | | | | Requires evergreen/cayman Signed-off-by: Glenn Kennard <[email protected]>
* r600g: Drop references to destroyed blend stateMichel Dänzer2014-10-221-1/+8
| | | | | | | | | | | | Fixes use-after-free when the currently bound blend state is destroyed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85267 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84140 Reviewed-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Cc: [email protected]
* r600g: Implement GL_ARB_sample_shadingGlenn Kennard2014-10-121-0/+20
| | | | | | | | 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: fix alpha-test with HyperZ enabled, fixing L4D2 tree corruptionMarek Olšák2014-09-031-6/+6
| | | | | | | | | | | *_update_db_shader_control depends on the alpha test state. The problem was it was in a block which is only entered if the pixel shader is changed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74863 Cc: [email protected] Tested-by: Benjamin Bellec <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* r600g: Fix flat/smooth shade state toggle10.3-branchpointGlenn Kennard2014-08-211-1/+3
| | | | | | | | | | | | | If only the flat/smooth shade state changed between two render calls the prior code would miss updating the hardware state. Also add check for sprite coord, potentially same type of issue otherwise for it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81967 Signed-off-by: Glenn Kennard <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600g: copy IA_MULTI_VGT_PARAM programming from radeonsi for CaymanMarek Olšák2014-08-191-0/+24
| | | | | Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: use r600_draw_rectangle from r600gMarek Olšák2014-08-191-64/+0
| | | | | | Rectangles are easier than triangles for the rasterizer. Reviewed-by: Michel Dänzer <[email protected]>
* r600g: Implement BPTC texture supportGlenn Kennard2014-08-151-0/+24
| | | | | | | Requires Evergreen/Cayman Signed-off-by: Glenn Kennard <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600g: implement invalidation of texture buffer objectsMarek Olšák2014-08-141-3/+36
| | | | | | This fixes piglit spec/ARB_texture_buffer_object/data-sync. Reviewed-by: Alex Deucher <[email protected]>
* r600g: use gpu_address from r600_resourceMarek Olšák2014-08-091-3/+3
| | | | | Reviewed-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: use TGSI_PROPERTY to disable viewport and clippingChristoph Bumiller2014-06-021-3/+8
| | | | | | | | | | 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: remove assert on draw with count == 0Christoph Bumiller2014-06-021-1/+0
| | | | Signed-off-by: Marek Olšák <[email protected]>
* r600g: fix for broken CULL_FRONT behavior on R6xxMarek Olšák2014-04-251-0/+19
| | | | | Cc: [email protected] Reviewed-by: Alex Deucher <[email protected]>
* gallium/radeon: create and return a fence in the flush functionMarek Olšák2014-04-161-2/+2
| | | | | | All flush functions get a fence parameter. cs_create_fence is removed. Reviewed-by: Christian König <[email protected]>
* r600g,radeonsi: attempt to fix racy multi-context apps calling BufferDataMarek Olšák2014-03-111-4/+1
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75061 v2: minimize the window where cs_buf != new_buf
* r600g,radeonsi: set priorities for relocationsMarek Olšák2014-03-111-4/+10
|
* r600g: port color buffer format conversion from radeonsiMarek Olšák2014-03-041-0/+149
| | | | | | | | | | | | r600_translate_colorformat is rewritten to look like radeonsi. r600_translate_colorswap is shared with radeonsi. r600_colorformat_endian_swap is consolidated. This adds some formats which were missing. Future "plain" formats will automatically be supported. Cc: [email protected] Reviewed-by: Alex Deucher <[email protected]>
* r600g,radeonsi: consolidate create_surface and surface_destroyMarek Olšák2014-02-251-44/+0
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* r600g: Use util_cpu_to_le32() instead of bswap32() on big-endian systemsTom Stellard2014-02-241-1/+1
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* r600g: add support for multiple viewports.Dave Airlie2014-02-111-7/+12
| | | | | | tested on rv635 and barts. Signed-off-by: Dave Airlie <[email protected]>
* gallium: remove PIPE_USAGE_STATICMarek Olšák2014-02-061-2/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* r600g,radeonsi: set resource domains in one place (v2)Marek Olšák2014-02-061-2/+2
| | | | | | | v2: This doesn't change the behavior. It only moves the tiling check to r600_init_resource and removes the usage parameter. Reviewed-by: Christian König <[email protected]>
* r600g: add support for geom shaders to r600/r700 chipsets (v2)Dave Airlie2014-02-051-1/+1
| | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: fix up shader out misc stuff for copy shaderDave Airlie2014-02-051-0/+7
| | | | | | | | | | | 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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: port the layered surface rendering patch from radeonsiDave Airlie2014-02-051-1/+0
| | | | | | | | | This just makes r600 and evergreen do what the radeonsi codepaths do for layered rendering. This makes the 2d amd_vertex_shader_layer test pass on evergreen. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: setup const texture buffers for geom shadersDave Airlie2014-02-051-0/+6
| | | | | | | | This just enables the workarounds we have for vertex/pixel shaders for geom shaders as well. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: write proper output prim typeDave Airlie2014-02-051-26/+0
| | | | | | | | Vadim's code derived it from the info.mode, but it needs to be takes from the geometry shader output primitive. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: emit streamout from dma copy shaderDave Airlie2014-02-051-0/+4
| | | | | | | | This enables streamout with GS in the mix, from the VS dma shader. 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-21/+140
| | | | | | | | | | | | | | 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: defer shader variant selection and depending state updatesVadim Girlin2014-02-051-66/+57
| | | | | | | | [airlied: fix dropped streamout line - fix for master] Signed-off-by: Vadim Girlin <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g,radeonsi: consolidate variables for CS tracingMarek Olšák2014-01-281-4/+4
| | | | | Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* r600g: move queries to drivers/radeonMarek Olšák2014-01-281-7/+25
| | | | | Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* r600g,radeonsi: consolidate buffer code, add handling of DISCARD_RANGE for SIMarek Olšák2013-12-121-5/+5
| | | | | | | | This adds 2 optimizations for radeonsi: - handling of DISCARD_RANGE - mapping an uninitialized buffer range is automatically UNSYNCHRONIZED Reviewed-by: Michel Dänzer <[email protected]>
* r600g,radeonsi: add common interface for buffer invalidationMarek Olšák2013-12-121-1/+2
| | | | | | This will be used by common code in the next commit. Reviewed-by: Michel Dänzer <[email protected]>
* r600g: refactor out code for buffer invalidationMarek Olšák2013-12-121-0/+55
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* r600g: properly unbind a DSA state being deleted in r600_delete_dsa_stateMarek Olšák2013-11-041-1/+8
| | | | Tested-by: Christian König <[email protected]>
* gallium: new, unified pipe_context::set_sampler_views() functionBrian Paul2013-10-231-14/+6
| | | | | | | | | | | | The new function replaces four old functions: set_fragment/vertex/ geometry/compute_sampler_views(). Note: at this time, it's expected that the 'start' parameter will always be zero. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Emil Velikov <[email protected]>
* r600g: remove an assertion causing a crash at context cleanupMarek Olšák2013-10-041-1/+0
| | | | | Compute samplers are advertised, but not implemented. I think that's intentional.
* radeon: don't use old bind_vertex/fragment_sampler_states() hooksBrian Paul2013-10-031-12/+6
|
* radeon: implement pipe_context::bind_sampler_states()Brian Paul2013-10-031-0/+1
|
* r600g: move r600g-specific functions out of r600_texture.cMarek Olšák2013-09-291-0/+451
|
* r600g,radeonsi: consolidate transfer, cmask, and fmask structuresMarek Olšák2013-09-291-1/+1
|
* r600g: fast color clears for single-sample buffersGrigori Goronzy2013-09-201-1/+1
| | | | | | | | | | | Allocate a CMASK on demand and use it to fast clear single-sample colorbuffers. Both FBOs and window system colorbuffers are fast cleared. Expand as needed when colorbuffers are mapped or displayed on screen. v2: cosmetics, move transfer expansion into dma_blit Signed-off-by: Marek Olšák <[email protected]>