summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* radv: Set variant code_size when created from the cache.Bas Nieuwenhuizen2017-04-201-0/+1
| | | | | Signed-off-by: Bas Nieeuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Add shader prefetch.Bas Nieuwenhuizen2017-04-193-0/+18
| | | | | | | | | | Gives me approximately a 2% perf increase in bot dota2 & talos. Having descriptors (both sets and vertex buffers) prefetched didn't help so I didn't include that. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Remove binding buffer count.Bas Nieuwenhuizen2017-04-193-13/+10
| | | | | | | In cases where it is used it is always 1. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Don't try to find gaps for non-freeable descriptors.Bas Nieuwenhuizen2017-04-191-2/+3
| | | | | | | | With this we don't have any operations on a pool with non-freeable descriptors left that have O(#descriptors) complexity. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Use host memory pool for non-freeable descriptors.Bas Nieuwenhuizen2017-04-192-16/+57
| | | | | | | | v2: Handle out of pool memory error. v3: Actually use VK_ERROR_OUT_OF_POOL_MEMORY_KHR for the error condition. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Don't allocate dynamic descriptors separately.Bas Nieuwenhuizen2017-04-191-12/+4
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* st/mesa: automake: honour the vdpau header install locationEmil Velikov2017-04-191-0/+1
| | | | | | | | | | | | | | If VDPAU is installed in the non-default location, we'll fail to find the headers and error at build time. ../../src/gallium/include/state_tracker/vdpau_dmabuf.h:37:25: fatal error: vdpau/vdpau.h: No such file or directory #include <vdpau/vdpau.h> ^ Fixes: faba96bc60b ("st/vdpau: add new interop interface") Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/sw/dri: don't use GNU void pointer arithmeticEmil Velikov2017-04-191-1/+1
| | | | | | | | | | | | | | | Resolves build issues like the following: src/gallium/winsys/sw/dri/dri_sw_winsys.c:203:31: error: pointer of type ‘void *’ used in arithmetic [-Werror=pointer-arith] data = dri_sw_dt->data + (dri_sw_dt->stride * box->y) + box->x * blsize; ^ src/gallium/winsys/sw/dri/dri_sw_winsys.c:203:62: error: pointer of type ‘void *’ used in arithmetic [-Werror=pointer-arith] data = dri_sw_dt->data + (dri_sw_dt->stride * box->y) + box->x * blsize; ^ Cc: <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* configure.ac: check require_basic_egl only if egl enabledEmil Velikov2017-04-191-1/+3
| | | | | | Fixes: 1ac40173c2a ("configure.ac: simplify EGL requirements for drivers dependent on EGL") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* configure.ac: manually expand PKG_CHECK_VAREmil Velikov2017-04-191-1/+1
| | | | | | | | | | The macro is introduced with pkgconfig v0.28 which isn't universally available. Thus it will error at configure stage. Reported-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]> Fixes: ce562f9e3fa ("EGL: Implement the libglvnd interface for EGL (v3)") Signed-off-by: Emil Velikov <[email protected]>
* mesa: add KHR_no_error support to glVertexAttribDivisor()Timothy Arceri2017-04-191-8/+10
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/vbo: add KHR_no_error support to DrawElements*() functionsTimothy Arceri2017-04-191-23/+73
| | | | | | V2: move MESA_VERBOSE checks back into the common code path. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/vbo: add KHR_no_error support to vbo_exec_DrawArrays*()Timothy Arceri2017-04-191-10/+39
| | | | | | V2: add missing FLUSH_CURRENT() to no_error path Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/vbo: move some Draw checks out of validationTimothy Arceri2017-04-192-41/+108
| | | | | | | These checks do not generate any errors. Move them so we can add KHR_no_error support and still make sure we do these checks. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/varray: add KHR_no_error support to *Pointer() functionsTimothy Arceri2017-04-191-116/+236
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/varray: add KHR_no_error support to some callers of validate_array_format()Timothy Arceri2017-04-191-63/+73
| | | | | | | The only caller we don't update is update_arrays(), we leave that to the following commit. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/varray: rename update_array_format() -> validate_array_format()Timothy Arceri2017-04-191-26/+45
| | | | | | | | | | We also move _mesa_update_array_format() into the caller. This gets these functions ready for KHR_no_error support. V2: Updated function comment as suggested by Brian. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/varray: create get_array_format() helperTimothy Arceri2017-04-191-11/+20
| | | | | | | | This will help us split array validation from array update. V2: add const to ctx param Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/varray: split update_array() into validate_array() and update_array()Timothy Arceri2017-04-191-14/+41
| | | | | | This will be used for adding KHR_no_error support. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add KHR_no_error support to glUniform*() functionsTimothy Arceri2017-04-191-23/+50
| | | | | | | V2: restore lost comment, add static to validate_uniform(), simplify array offset logic. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: always return GL_OUT_OF_MEMORY or GL_NO_ERROR when KHR_no_error enabledTimothy Arceri2017-04-191-0/+11
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add _mesa_is_no_error_enabled() helperTimothy Arceri2017-04-191-0/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add env var to force enable the KHR_no_error ctx flagTimothy Arceri2017-04-192-0/+9
| | | | | | | V2: typo know -> known V3: add security check (Suggested by Nicolai) Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: expose KHR_no_errorTimothy Arceri2017-04-191-0/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* r600g: update dirty_level_mask after the 1-st draw after FB changeConstantine Kharlamov2017-04-194-18/+26
| | | | | | | | | | | Ported from radeonsi. Testing with Kane&Lynch2 shows ≈1k skipped updates per frame on average. No piglit changes with tests/gpu.py, gbm mode. Signed-off-by: Constantine Kharlamov <[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* vbo: fix gl_DrawID handling in glMultiDrawArraysNicolai Hähnle2017-04-191-6/+15
| | | | | | | | Fixes a bug in KHR-GL45.shader_draw_parameters_tests.ShaderMultiDrawArraysParameters. Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* mesa: move glMultiDrawArrays to vbo and fix error handlingNicolai Hähnle2017-04-196-19/+127
| | | | | | | | | | | | | | | | When any count[i] is negative, we must skip all draws. Moving to vbo makes the subsequent change easier. v2: - provide the function in all contexts, including GLES - adjust validation accordingly to include the xfb check v3: - fix mix-up of pre- and post-xfb prim count (Nils Wallménius) Cc: [email protected] Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: extract need_xfb_remaining_prims_checkNicolai Hähnle2017-04-191-20/+28
| | | | | | | | The same logic needs to be applied to glMultiDrawArrays. Cc: [email protected] Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: fix remaining xfb prims check for GLES with multiple instancesNicolai Hähnle2017-04-191-1/+1
| | | | | | | | Found by inspection. Cc: [email protected] Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radv/meta: Fix nir_builder.h includeMike Lothian2017-04-191-1/+1
| | | | | | | | | | | | | This fixes the build after: commit 399ebd2a84a133bd2ca3da388a059fd3bafe33f5 Author: Dave Airlie <[email protected]> Date: Wed Apr 19 06:18:23 2017 +1000 radv/meta: add common shader vertex generation function Signed-off-by: Mike Lothian <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: Fix nir.h includeMike Lothian2017-04-191-1/+1
| | | | | | | | | | | | | This fixes the build after: commit 224cf2906a8f38ce47411afc93a223ac0e41795f Author: Dave Airlie <[email protected]> Date: Mon Apr 17 13:01:52 2017 +1000 radv/ac: add initial pre-pass for shader info gathering Signed-off-by: Mike Lothian <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: refactor out some common shaders.Dave Airlie2017-04-195-104/+43
| | | | | | | | The vs vertex generate and fs noop shaders are used in a few places, so refactor them out. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: generate position for blit shaders.Dave Airlie2017-04-191-51/+16
| | | | | | | This generates the position info using the vertex shader. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: reduce vertex buffer in blit2d.Dave Airlie2017-04-191-28/+7
| | | | | | | Generate the position vertices. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: reduce vertex buffer usage in clear shadersDave Airlie2017-04-193-53/+25
| | | | | | | | | For depth clears we have to pass the depth in the 2nd component, we can use push constants for some of this later to drop the vertex buffer completely Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: avoid using vertex buffer for resolve shader.Dave Airlie2017-04-191-67/+7
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: move depth decompress to using inline vertex dataDave Airlie2017-04-191-69/+6
| | | | | | | | This removes the vertex buffer, and just generates the values in the shader. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: move fast clear to generate vertices in shader.Dave Airlie2017-04-191-68/+6
| | | | | | | Avoids having to setup vertex buffers. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: add common shader vertex generation functionDave Airlie2017-04-192-0/+39
| | | | | | | | | | Instead of passing in the same 1.0, -1.0 combinations via vertex buffers, we can just use vertex id to have the vertex shader build them. This function introduces the generator code needed, later patches will use this. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: add support for save/restore meta without vertex data.Dave Airlie2017-04-192-8/+38
| | | | | | | | Some of the shaders could just generate the vertex data in the shader, so add helpers to allow us to move to doing that. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: drop debugging leftovers code in descriptor set patches.Dave Airlie2017-04-191-3/+0
| | | | Signed-off-by: Dave Airlie <[email protected]>
* radv: add support for 32 descriptor sets.Dave Airlie2017-04-192-7/+7
| | | | | | | | | This bumps the limit to the number of sets to 32, now that we have proper support for it. It also uses 1u in a few places to make things a bit safer. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: add support for indirect access of descriptor sets.Dave Airlie2017-04-195-18/+105
| | | | | | | | | | | | | | | | | | | We want to expose more descriptor sets to the applications, but currently we have a 1:1 mapping between shader descriptor sets and 2 user sgprs, limiting us to 4 per stage. This commit check if we don't have enough user sgprs for the number of bound sets for this shader, we can ask for them to be indirected. Two sgprs are then used to point to a buffer or 64-bit pointers to the number of allocated descriptor sets. All shaders point to the same buffer. We can use some user sgprs to inline one or two descriptor sets in future, but until we have a workload that needs this I don't think we should spend too much time on it. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: start allocating user sgprsDave Airlie2017-04-191-13/+74
| | | | | | | | | | | | This adds an initial implementation to allocate the user sgprs and make sure we don't run out if we try to bind a bunch of descriptor sets. This can be enhanced further in the future if we add support for inlining push constants. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: mark used descriptor sets in shader info.Dave Airlie2017-04-192-0/+35
| | | | | | | This pre calculates the used descriptor sets. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: frag shader only needs ring offsets if sample positions enabledDave Airlie2017-04-191-1/+4
| | | | | | | | mostly documenting things, since with modern llvm we always have the spill enabled. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: move needs_push_constants to shader info.Dave Airlie2017-04-193-10/+11
| | | | | | | First step to optimising push constants. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: optimise compute shader grid size emission.Dave Airlie2017-04-194-13/+29
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: start conditionalising vertex inputs. (v2)Dave Airlie2017-04-194-14/+63
| | | | | | | | | | | In practice this will probably just drop draw id in a few places. v2: just do draw_id for now. (Bas) it might be possible to do something more if we need it in the future. (nha) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: add initial pre-pass for shader info gatheringDave Airlie2017-04-196-9/+116
| | | | | | | | | | | | There is some radv specific info we need to gather from shaders before we get into converting nir->llvm, so we can make better decisions especially around user sgpr allocation. This is just an initial placeholder to gather if sample positions are required in the frag shader. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>