summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* nir: Get rid of nir_constant_dataJason Ekstrand2016-12-027-105/+98
| | | | | | | | This has bothered me for about as long as NIR has been around. Why do we have two different unions for constants? No good reason other than one of them is a direct port from GLSL IR. Reviewed-by: Iago Toral Quiroga <[email protected]>
* Revert "st/mesa: get Version from gl_program rather than gl_shader_program"Timothy Arceri2016-12-021-1/+4
| | | | | | | This reverts commit 6bf63b011992dbbc899a28bde5692070dbcf965a. A patch that adds a reference to gl_shader_program_data to gl_program needs to land befor this one.
* st/mesa: get Version from gl_program rather than gl_shader_programTimothy Arceri2016-12-021-4/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa/glsl: move Version to gl_shader_program_dataTimothy Arceri2016-12-026-21/+27
| | | | | | | | | | | This is mostly just used during linking however the st uses it when updating textures. In order to store gl_program in the CurrentProgram array rather than gl_shader_program we need to move this field to the shared gl_shader_program_data struct. Reviewed-by: Nicolai Hähnle <[email protected]>
* freedreno: no-op render when we need a fenceRob Clark2016-12-013-7/+40
| | | | | | | | | If app tries to create a fence but there is no rendering to submit, we need a dummy/no-op submit. Use a string-marker for the purpose.. mostly since it avoids needing to realize that the packet format changes in later gen's (so one less place to fixup for a5xx). Signed-off-by: Rob Clark <[email protected]>
* freedreno: native fence fd supportRob Clark2016-12-017-8/+69
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: some fence cleanupRob Clark2016-12-019-27/+23
| | | | | | | | Prep-work for next patch, mostly move to tracking last_fence as a pipe_fence_handle (created now only in fd_gmem_render_tiles()), and a bit of superficial renaming. Signed-off-by: Rob Clark <[email protected]>
* gallium: support for native fence fd'sRob Clark2016-12-0118-2/+91
| | | | | | | This enables gallium support for EGL_ANDROID_native_fence_sync, for drivers which support PIPE_CAP_NATIVE_FENCE_FD. Signed-off-by: Rob Clark <[email protected]>
* gallium: wire up server_wait_syncRob Clark2016-12-012-1/+11
| | | | | | | | This will be needed for explicit synchronization with devices outside the gpu, ie. EGL_ANDROID_native_fence_sync. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl: add EGL_ANDROID_native_fence_syncRob Clark2016-12-017-7/+119
| | | | | | | | | | With fixes from Chad squashed in, plus fixes for issues that Rafael found while writing piglit tests. Signed-off-by: Rob Clark <[email protected]> Tested-by: Rafael Antognolli <[email protected]> Reviewed-by: Chad Versace <[email protected]> Tested-by: Chad Versace <[email protected]>
* dri: extend fence extension to support native fd fencesRob Clark2016-12-011-1/+43
| | | | | | | | | Required to implement EGL_ANDROID_native_fence_sync. Signed-off-by: Rob Clark <[email protected]> Tested-by: Rafael Antognolli <[email protected]> Reviewed-by: Chad Versace <[email protected]> Tested-by: Chad Versace <[email protected]>
* egl: un-fallthrough sync attr parsingRob Clark2016-12-011-3/+3
| | | | | | | | | | Doesn't work so well when you start having more than one possible attrib. Prep-work for next patch. Signed-off-by: Rob Clark <[email protected]> Tested-by: Rafael Antognolli <[email protected]> Reviewed-by: Chad Versace <[email protected]> Tested-by: Chad Versace <[email protected]>
* egl: initialize SyncCondition after attr parsingRob Clark2016-12-011-1/+2
| | | | | | | | | | | Reduce the noise in the next patch. For EGL_SYNC_NATIVE_FENCE_ANDROID the sync condition is conditional on EGL_SYNC_NATIVE_FENCE_FD_ANDROID attribute. Signed-off-by: Rob Clark <[email protected]> Tested-by: Rafael Antognolli <[email protected]> Reviewed-by: Chad Versace <[email protected]> Tested-by: Chad Versace <[email protected]>
* tgsi: store writes_primid when scanning tgsiTim Rowley2016-12-012-0/+4
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: only verify that enabled arrays have backing buffersIlia Mirkin2016-12-011-1/+1
| | | | | | | | | | | | We were previously also verifying that no backing buffers were available when an array wasn't enabled. This is has no basis in the spec, and it causes GLupeN64 to fail as a result. Fixes: c2e146f487 ("mesa: error out in indirect draw when vertex bindings mismatch") Cc: [email protected] Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* vc4: Avoid false scheduling dependencies for LOAD_IMMs.Eric Anholt2016-11-302-0/+9
| | | | | | | | | | Noticed in shaders with branching, where we ended up scheduling delay slots near the start of a block for the uniforms reset setup. total instructions in shared programs: 93970 -> 93951 (-0.02%) instructions in affected programs: 3117 -> 3098 (-0.61%) 3DMMES performance +0.423087% +/- 0.133521% (n=9,10)
* vc4: Try to schedule QIR instructions between writing to and reading math.Eric Anholt2016-11-301-0/+22
| | | | | | | | | This helps us get the delay slots between SFU writes and reads filled. total instructions in shared programs: 94494 -> 93970 (-0.55%) instructions in affected programs: 59206 -> 58682 (-0.89%) 3DMMES performance +1.89967% +/- 0.157611% (n=10,9)
* vc4: Improve interleaving of texture coordinates vs results.Eric Anholt2016-11-301-3/+3
| | | | | | | | | | | | | | | | | | | | The latency_between was trying to handle the delay between the coordinate write ("before") and the corresponding sample read ("after"), but we were handing in the two instructions swapped. This meant that we tried to fit things between a tex_s and its *preceding* tex_result. This made us only interleave normal texture coordinates by accident, and pessimized UBO reads by pushing the tex_result collection earlier until there was nothing but it (and then its preceding coordinate setup) left. In addition to latency reduction, things end up packing better (probably due to reduced live ranges of the texture results): total instructions in shared programs: 98121 -> 94775 (-3.41%) instructions in affected programs: 91196 -> 87850 (-3.67%) 3DMMES performance +1.15569% +/- 0.124714% (n=8,10)
* vc4: Fix stray "." on no-op MUL packs.Eric Anholt2016-11-301-6/+6
| | | | | This happened when the PM bit was set for R4 unpacks, where the MUL pack was NOP.
* vc4: Allow merging instructions with SF set where the other writes NOP.Eric Anholt2016-11-301-0/+1
| | | | | | | | | | | | | I'm not sure how I managed to write the SF merge code (7d8b79f398f18ed7bb48a74b1b82950e2f08abad) without allowing merges with NOPs. *Everything* we try to merge with will have a NOP on one or the other side of the instruction, and that's why that commit showed no benefit. total instructions in shared programs: 99347 -> 95128 (-4.25%) instructions in affected programs: 91906 -> 87687 (-4.59%) 3DMMES performance +2.57105% +/- 0.135276% (n=6,8)
* vc4: In a loop break/continue, jump if everyone has taken the path.Eric Anholt2016-11-301-10/+17
| | | | | | | | | | | | | | | | | This should be a win for most loops, which tend to have uniform control flow. More importantly, it exposes important information to live variables: that the break/continue here means that our jump target may have access to values that were live on our input. Previously, we were just setting the exec mask and letting control flow fall through, so an intervening def between the break and the end of the loop would appear to live variables as if it screened off the variable, when it didn't actually. Fixes a regression in glsl-vs-loop-redundant-condition.shader_test when a perturbing of register allocation caused a live variable to get stomped. Cc: 13.0 <[email protected]>
* anv: expose support for VK_KHR_sampler_mirror_clamp_to_edgeIlia Mirkin2016-11-301-0/+4
| | | | | | | This is already supported in genX_state.c, expose the extension string. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Actually use the stencil dimensionJason Ekstrand2016-11-301-1/+1
| | | | | | | | In an attempt to fix 3DSTATE_DEPTH_BUFFER for stencil-only cases, I accidentally kept setting the SurfaceType to 2D in the stencil-only case thanks to a copy+paste error. Reviewed-by: Nanley Chery <[email protected]>
* swr: add streamout buffer offset into pBuffer pointerIlia Mirkin2016-11-301-2/+3
| | | | | | | | The buffer_size does not take the offset into account. Just add the offset into the pointer which lines up the structures much better. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
* swr: fix assertion for max number of so targetsIlia Mirkin2016-11-301-1/+1
| | | | | | | The number has to be less than or equal to the max, not just less than. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
* swr: properly report max number of SO componentsIlia Mirkin2016-11-301-1/+1
| | | | | | | | The components count the number of individual values, not the number of slots. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
* swr: turn off queries around blitsIlia Mirkin2016-11-301-1/+9
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
* swr: don't advertise stream pause/resumeIlia Mirkin2016-11-301-1/+1
| | | | | | | | | There is no support for resuming streamout. Furthermore, this also controls glDrawTransformFeedback functionality which requires the same ability to query how many primitives were sent out of TF. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
* swr: fix range computation for instanced client-side arraysIlia Mirkin2016-11-302-24/+52
| | | | | | | | | | | We need to take the instance divisor and number of instances into account for instanced client-side arrays, rather than the vertex parameters. Loosely based on the comparable nvc0 logic. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer memory] assert when trying to convert an unknown formatIlia Mirkin2016-11-301-0/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
* swr: remove warning about multi-layer surfacesIlia Mirkin2016-11-301-4/+0
| | | | | | | | | | We now support clearing these, and actually rendering to multiple layers would require GS support, which will fail in much more spectacular ways for now. Once that is hooked up, there won't be anything else to do here. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] don't attempt to load another RTAI when storingIlia Mirkin2016-11-301-1/+1
| | | | | | | | | Since we don't pass a renderTargetArrayIndex in, and the current hot tile may be for a different index, we may end up loading the RTAI=0 into the hot tile for no reason. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
* radeonsi: document a CP DMA bug that doesn't need a workaround yetMarek Olšák2016-12-011-1/+5
| | | | | | This one is easy to miss, because it's not documented in any internal doc. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: apply the double EVENT_WRITE_EOP workaround to VI as wellMarek Olšák2016-12-011-2/+4
| | | | | | | | | | | | Internal docs don't mention it, but they also don't mention that the bug has been fixed (like other CI bugs fixed in VI). Vulkan does this too. v2: also update r600_gfx_write_fence_dwords Cc: 13.0 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> (v1)
* radeonsi: add a tess+GS hang workaround for VI dGPUsMarek Olšák2016-12-011-2/+10
| | | | | | | ported from Vulkan Cc: 13.0 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: don't apply the Z export bug workaround to HainanMarek Olšák2016-12-011-2/+3
| | | | | | not needed Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: apply a tessellation bug workaround for SIMarek Olšák2016-12-011-0/+7
| | | | | Cc: 13.0 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: apply a TC L1 write corruption workaround for SIMarek Olšák2016-12-011-11/+23
| | | | | Cc: 13.0 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: apply a multi-wave workgroup SPI bug workaround to affected CIK chipsMarek Olšák2016-12-014-4/+29
| | | | | | | All codepaths are handled except for clover. Cc: 13.0 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: consolidate max-work-group-size computationMarek Olšák2016-12-011-24/+19
| | | | | | | The next commit will need this. Cc: 13.0 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: reset linked_stages bitmask when re-linkingTimothy Arceri2016-12-011-0/+2
| | | | | | | | | | | | | | | 34953f8907fdd added this bitmask but it wasn't being reset when a program was relinked. If a stage was removed from the new program then it could case a crash as we expect the linked shader for that stage to not be null. Fixes crashes in: ESEXT-CTS.tessellation_shader.single.xfb_captures_data_from_correct_stage ES31-CTS.core.tessellation_shader.single.xfb_captures_data_from_correct_stage Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98917
* freedreno/a5xx: fix negative branchesRob Clark2016-11-302-1/+6
| | | | | | | | Looks like immed branch offset size increased again.. making what we think is a small negative number look to hw like a huge positive number. And things go badly when shader tries to jump to hyperspace. Signed-off-by: Rob Clark <[email protected]>
* freedreno: fix android build with a5xxRob Clark2016-11-301-0/+1
| | | | | | | | | Android doesn't build all the files that normal linux/autotools build does (mainly standalond ir3_compiler).. but possibly we should pull C_SOURCES + aNxx_SOURCES into a single variable picked up by both Android.mk and Makefile.am? (Suggested by Rob H.) Signed-off-by: Rob Clark <[email protected]>
* freedreno/a5xx: fix discardRob Clark2016-11-301-3/+4
| | | | Signed-off-by: Rob Clark <[email protected]>
* anv: Prefer in-tree headers to out-of-tree headersVille Syrjälä2016-11-301-5/+11
| | | | | | | | | | | | | | | | | | Set the include paths to consider in-tree headers before out-of-tree headers. Avoids the build failing due to stale headers being present in $prefix. Previosuly 'make -ki install' or something similar was required to update the out-of-tree headers to allow the build to succeed. Also avoids having to rebuild the entire thing after every 'make install'. Cc: Rob Clark <[email protected]> Cc: Jason Ekstrand <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* freedreno/a5xx: initial supportRob Clark2016-11-3034-18/+4471
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: update generated headersRob Clark2016-11-3010-100/+4125
| | | | | | Pull in a5xx Signed-off-by: Rob Clark <[email protected]>
* freedreno: make gmem tile size alignment configurableRob Clark2016-11-303-8/+17
| | | | | | | a5xx seems to prefer 64 pixel alignment, in at least some cases. Make this configurable per generation. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: don't offset inloc by 8Rob Clark2016-11-304-27/+15
| | | | | | | | | On a3xx/a4xx, the SP_VS_VPC_DST_REG.OUTLOCn is offset by 8, so we used to add this offset into fs->inputs[n].inloc. But a5xx drops this extra offset-by-8. So instead make inloc zero based and add the offset when we emit OUTLOCn values (for the gen's that need the offset). Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: use new shader linkage helperRob Clark2016-11-301-27/+16
| | | | Signed-off-by: Rob Clark <[email protected]>