summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_state_common.c
AgeCommit message (Collapse)AuthorFilesLines
2014-08-21r600g: Fix flat/smooth shade state toggle10.3-branchpointGlenn Kennard1-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 <glenn.kennard@gmail.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-08-19r600g: copy IA_MULTI_VGT_PARAM programming from radeonsi for CaymanMarek Olšák1-0/+24
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-08-19radeonsi: use r600_draw_rectangle from r600gMarek Olšák1-64/+0
Rectangles are easier than triangles for the rasterizer. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-08-15r600g: Implement BPTC texture supportGlenn Kennard1-0/+24
Requires Evergreen/Cayman Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-08-14r600g: implement invalidation of texture buffer objectsMarek Olšák1-3/+36
This fixes piglit spec/ARB_texture_buffer_object/data-sync. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-08-09r600g: use gpu_address from r600_resourceMarek Olšák1-3/+3
Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-02r600g: use TGSI_PROPERTY to disable viewport and clippingChristoph Bumiller1-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 <david.heidelberger@ixit.cz> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-06-02r600g: remove assert on draw with count == 0Christoph Bumiller1-1/+0
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-04-25r600g: fix for broken CULL_FRONT behavior on R6xxMarek Olšák1-0/+19
Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-04-16gallium/radeon: create and return a fence in the flush functionMarek Olšák1-2/+2
All flush functions get a fence parameter. cs_create_fence is removed. Reviewed-by: Christian König <christian.koenig@amd.com>
2014-03-11r600g,radeonsi: attempt to fix racy multi-context apps calling BufferDataMarek Olšák1-4/+1
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75061 v2: minimize the window where cs_buf != new_buf
2014-03-11r600g,radeonsi: set priorities for relocationsMarek Olšák1-4/+10
2014-03-04r600g: port color buffer format conversion from radeonsiMarek Olšák1-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: mesa-stable@lists.freedesktop.org Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-25r600g,radeonsi: consolidate create_surface and surface_destroyMarek Olšák1-44/+0
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-02-24r600g: Use util_cpu_to_le32() instead of bswap32() on big-endian systemsTom Stellard1-1/+1
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-02-11r600g: add support for multiple viewports.Dave Airlie1-7/+12
tested on rv635 and barts. Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-02-06gallium: remove PIPE_USAGE_STATICMarek Olšák1-2/+2
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-02-06r600g,radeonsi: set resource domains in one place (v2)Marek Olšák1-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 <christian.koenig@amd.com>
2014-02-05r600g: add support for geom shaders to r600/r700 chipsets (v2)Dave Airlie1-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 <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-05r600g: fix up shader out misc stuff for copy shaderDave Airlie1-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 <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-05r600g: port the layered surface rendering patch from radeonsiDave Airlie1-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 <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-05r600g: setup const texture buffers for geom shadersDave Airlie1-0/+6
This just enables the workarounds we have for vertex/pixel shaders for geom shaders as well. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-05r600g: write proper output prim typeDave Airlie1-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 <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-05r600g: emit streamout from dma copy shaderDave Airlie1-0/+4
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>
2014-02-05r600g: initial support for geometry shaders on evergreen (v2)Vadim Girlin1-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 <vadimgirlin@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-05r600g: defer shader variant selection and depending state updatesVadim Girlin1-66/+57
[airlied: fix dropped streamout line - fix for master] Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-01-28r600g,radeonsi: consolidate variables for CS tracingMarek Olšák1-4/+4
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2014-01-28r600g: move queries to drivers/radeonMarek Olšák1-7/+25
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-12-12r600g,radeonsi: consolidate buffer code, add handling of DISCARD_RANGE for SIMarek Olšák1-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 <michel.daenzer@amd.com>
2013-12-12r600g,radeonsi: add common interface for buffer invalidationMarek Olšák1-1/+2
This will be used by common code in the next commit. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-12-12r600g: refactor out code for buffer invalidationMarek Olšák1-0/+55
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-11-04r600g: properly unbind a DSA state being deleted in r600_delete_dsa_stateMarek Olšák1-1/+8
Tested-by: Christian König <christian.koenig@amd.com>
2013-10-23gallium: new, unified pipe_context::set_sampler_views() functionBrian Paul1-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 <sroland@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-10-04r600g: remove an assertion causing a crash at context cleanupMarek Olšák1-1/+0
Compute samplers are advertised, but not implemented. I think that's intentional.
2013-10-03radeon: don't use old bind_vertex/fragment_sampler_states() hooksBrian Paul1-12/+6
2013-10-03radeon: implement pipe_context::bind_sampler_states()Brian Paul1-0/+1
2013-09-29r600g: move r600g-specific functions out of r600_texture.cMarek Olšák1-0/+451
2013-09-29r600g,radeonsi: consolidate transfer, cmask, and fmask structuresMarek Olšák1-1/+1
2013-09-20r600g: fast color clears for single-sample buffersGrigori Goronzy1-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 <marek.olsak@amd.com>
2013-08-31r600g: move streamout state to drivers/radeonMarek Olšák1-205/+104
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>
2013-07-08r600g: split INVAL_READ_CACHES into vertex, tex, and const cache flagsMarek Olšák1-4/+4
also flushing any cache in evergreen_emit_cs_shader seems to be superfluous (we don't flush caches when changing the other shaders either) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-07-08r600g: adjust flush flags (v3)Alex Deucher1-3/+4
1. flush SH with read caches 2. add flag for DB flushes 3. add flag for CB flushes v2: flush all CBs, remove redundant emit_state variable. v3: Marek: also set the new flags in r600_context_flush, the CP dma functions, and texture_barrier, and rename them Signed-off-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-17gallium: replace bswap_32 calls with util_bswap32Jonathan Gray1-2/+2
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>
2013-05-25gallium: Add support for multiple viewportsZack Rusin1-4/+6
Gallium supported only a single viewport/scissor combination. This commit changes the interface to allow us to add support for multiple viewports/scissors. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: José Fonseca<jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-05-03r600g: Correctly initialize the shader key, v2Lauri Kasanen1-1/+2
Assigning a struct only copies the members - any padding is left as is. Thus this code: struct foo_t foo; foo = bar; leaves the padding of foo intact, ie uninitialized random garbage. This patch fixes constant shader recompiles by initializing the struct to zero. For completeness, memcpy is used to copy the key to the shader struct. NOTE: This is a candidate for the stable branches. Signed-off-by: Lauri Kasanen <cand@gmx.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
2013-04-25winsys/radeon: consolidate tracing into winsys v2Jerome Glisse1-4/+0
This move the tracing timeout and printing into winsys and add an debug environement variable for it (R600_DEBUG=trace_cs). Lot of file touched because of winsys API changes. v2: Do not write lockup file if ib uniq id does not match last one Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-03-26r600g: add a driver query returning the number of draw_vbo callsMarek Olšák1-0/+1
between begin_query and end_query
2013-03-26r600g: fix crash while binding a NULL constant bufferMarek Olšák1-1/+1
2013-03-11r600g: remove deprecated state management codeMarek Olšák1-40/+0
It's nice to see so much code that did pretty much nothing go away. Reviewed-by: Jerome Glisse <jglisse@redhat.com>
2013-03-11r600g: atomize pixel shaderMarek Olšák1-8/+12
Reviewed-by: Jerome Glisse <jglisse@redhat.com>