summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* docs: link to the meson_options.txt file gitlab.freedesktop.orgBrian Paul2019-03-171-1/+2
|
* docs: separate information for compiler selection and compiler optionsBrian Paul2019-03-171-19/+39
| | | | | | Split up the "Environment Variables" section into "Compiler Options" and "Compiler Specification". I think this makes the information easier to find and understand.
* android: nouveau: add support for nirMauro Rossi2019-03-181-1/+6
| | | | | | | | Add the necessary build rules for android, to avoid building errors. Fixes: f014ae3 ("nouveau: add support for nir") Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Karol Herbst <[email protected]>
* ac/nir_to_llvm: add assert to emit_bcsel()Timothy Arceri2019-03-181-0/+2
| | | | | | | nir to llvm assumes we have already split vectors to scalars via nir_lower_alu_to_scalar(). Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radeonsi/nir: call some more var optimisation passesTimothy Arceri2019-03-181-3/+8
| | | | | | | | | | | | | | | | | | shader-db results (VEGA64): Totals from affected shaders: SGPRS: 5328912 -> 5329680 (0.01 %) VGPRS: 2969308 -> 2969164 (-0.00 %) Spilled SGPRs: 37921 -> 37917 (-0.01 %) Spilled VGPRs: 32882 -> 29024 (-11.73 %) Private memory VGPRs: 0 -> 0 (0.00 %) Scratch size: 1400 -> 1200 (-14.29 %) dwords per thread Code Size: 121126000 -> 121282784 (0.13 %) bytes LDS: 1501 -> 1501 (0.00 %) blocks Max Waves: 933188 -> 933229 (0.00 %) Wait states: 0 -> 0 (0.00 %) Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* vulkan/util: meson build - add wayland client includeTobias Klausmann2019-03-171-0/+7
| | | | | | | | | | | | | | | | | | | Without this the build breaks with: In file included from ../src/vulkan/util/vk_util.h:32, from ../src/vulkan/util/vk_util.c:28: ../include/vulkan/vulkan.h:51:10: fatal error: wayland-client.h: No such file or directory #include <wayland-client.h> ^~~~~~~~~~~~~~~~~~ compilation terminated. The above misses the include directory for wayland: -I/usr/include/wayland Signed-off-by: Tobias Klausmann <[email protected]> Cc: [email protected] Reviewed-by: Eric Engestrom <[email protected]>
* nv50ir/nir: move immediates before useKarol Herbst2019-03-171-18/+41
| | | | Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: handle user clip planes for each emitted vertexKarol Herbst2019-03-171-1/+7
| | | | | | | v9: convert to C++ style comments handle for tess eval shaders as well Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: implement intrinsic shader_clockKarol Herbst2019-03-171-0/+8
| | | | | | v9: mark as fixed Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: implement load_per_vertex_outputKarol Herbst2019-03-171-0/+23
| | | | | | | | | v4: use smarter getIndirect helper use new getSlotAddress helper v5: use loadFrom helper v8: don't require C++11 features Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: add memory barriersKarol Herbst2019-03-171-0/+21
| | | | | | v5: add more barrier intrinsics Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: implement imagesKarol Herbst2019-03-171-10/+380
| | | | | | | | | | | | | | | | | | | | v3: fix compiler warnings v4: use loadFrom helper v5: fix signed min/max v6: set tex mask add support for indirect image access set cache mode v7: make compatible with 884d27bcf688d36c3bbe01bceca525595add3b33 rework the whole deref thing to prepare for bindless v8: port to deref instructions don't require C++11 features v9: implement MS images rebase on master (image modifiers) fix regressions due to variable src compnents replace '(*it).' with 'it->' convert to C++ style comments Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: implement ssbo intrinsicsKarol Herbst2019-03-171-0/+90
| | | | | | | | v4: use loadFrom helper v5: support indirect buffer access v8: don't require C++11 features Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: implement nir_intrinsic_load_uboKarol Herbst2019-03-171-0/+14
| | | | | | | v4: use loadFrom helper v8: don't require C++11 features Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: implement geometry shader nir_intrinsicsKarol Herbst2019-03-171-0/+27
| | | | | | | | | v4: use smarter getIndirect helper use new getSlotAddress helper use loadFrom helper v8: don't require C++11 features Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: implement variable indexingKarol Herbst2019-03-171-0/+58
| | | | | | | | | | | | | | We store those arrays in local memory and reserve some space for each of the arrays. With NIR we could store those arrays packed, but we don't do that yet as it causes MemoryOpt to generate unaligned memory accesses. v3: use fixed size vec4 arrays until we fix MemoryOpt v4: fix for 64 bit types v5: use loadFrom helper v8: don't require C++11 features v9: convert to C++ style comments Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: implement vote and ballotKarol Herbst2019-03-171-0/+48
| | | | | | | | | | | | | v2: add vote_eq support use the new subop intrinsic helper add ballot v3: add read_(first_)invocation v8: handle vectorized intrinsics don't require C++11 features v9: lower_subgroups to 32 bit (produces less instructions) use getSSA and getScratch instead of new_LValue Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: add skeleton getOperation for intrinsicsKarol Herbst2019-03-171-0/+22
| | | | | | | v7: don't assert in default case for getSubOp Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* nv50/ir/nir: implement nir_instr_type_texKarol Herbst2019-03-171-0/+234
| | | | | | | | | | | | | | | | | | | a lot of those fields are not valid for a lot of tex ops. Not quite sure if it's worth the effort to check for those or just keep it like that. It seems to kind of work. v2: reworked offset handling add tex support with indirect R/S arguments handle GLSL_SAMPLER_DIM_EXTERNAL drop reference in convert(glsl_sampler_dim&, bool, bool) fix tg4 component selection v5: fill up coords args with scratch values if coords provided is less than TexTarget.getArgCount() v7: prepare for bindless_texture support v8: don't require C++11 features v9: convert to C++ style comments fix txf with a uniform constant 0 lod Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: implement nir_ssa_undef_instrKarol Herbst2019-03-171-0/+13
| | | | | | | | v2: use mkOp v8: don't require C++11 features Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* nv50/ir/nir: implement loading system valuesKarol Herbst2019-03-171-0/+122
| | | | | | | | | | | | | v2: support more sys values fixed a bug where for multi component reads all values ended up in x v3: add load_patch_vertices_in v4: add subgroup stuff v5: add helper invocation v6: fix loading 64 bit system values v8: don't require C++11 features v9: convert to C++ style comments Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: implement intrinsic_discard(_if)Karol Herbst2019-03-171-0/+14
| | | | | | v9: use getSSA instead of new_LValue Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: implement load_(interpolated_)input/outputKarol Herbst2019-03-171-0/+135
| | | | | | | | | | | | | | | | | v3: and load_output v4: use smarter getIndirect helper use new getSlotAddress helper v5: don't use const_offset directly fix for indirects v6: add support for interpolateAt v7: fix compiler warnings add load_barycentric_sample handle load_output for fragment shaders v8: set info->prop.fp.readsSampleLocations for at_sample interpolation don't require C++11 features v9: convert to C++ style comments Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: implement nir_intrinsic_store_(per_vertex_)outputKarol Herbst2019-03-171-1/+56
| | | | | | | | | | | | | | v3: add workaround for RA issues indirects have to be multiplied by 0x10 fix indirect access v4: use smarter getIndirect helper use storeTo helper v5: don't use const_offset directly v8: don't require C++11 features v9: convert to C++ style comments handle clip planes correctly Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: implement nir_intrinsic_load_uniformKarol Herbst2019-03-171-0/+10
| | | | | | | | | | | v2: use new getIndirect helper fixes symbols for 64 bit types v4: use smarter getIndirect helper simplify address calculation use loadFrom helper v8: don't require C++11 features Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: implement nir_alu_instr handlingKarol Herbst2019-03-171-1/+561
| | | | | | | | | | | | | | | | | | | | v2: user bitfield_insert instead of bfi rework switch helper macros remove some lowering code (LoweringHelper is now used for this) v3: add pack_half_2x16_split add unpack_half_2x16_split_x/y v5: replace first argument with nullptr in loadImm calls prefer getSSA over getScratch v8: fix setting precise modifier for first instruction inside a block add guard in case no instruction gets inserted into an empty block don't require C++11 features v9: use CC_NE for integer compares convert to C++ style comments fix b2f for doubles remove macros around nir ops to make it easier to grep them add handling for fpow Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: add skeleton for nir_intrinsic_instrKarol Herbst2019-03-171-0/+17
| | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* nv50/ir/nir: implement nir_load_const_instrKarol Herbst2019-03-171-0/+28
| | | | | | | v8: fix loading 8/16 bit constants Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* nv50/ir/nir: parse NIR shader infoKarol Herbst2019-03-171-3/+320
| | | | | | | | | | | v2: parse a few more fields v3: add special handling for GL_ISOLINES v8: set info->prop.fp.readsSampleLocations don't require C++11 features v9: replace '(*it).' with 'it->' convert to C++ style comments Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: add loadFrom and storeTo helplerKarol Herbst2019-03-171-0/+72
| | | | | | v8: don't require C++11 features Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: run assignSlotsKarol Herbst2019-03-171-0/+642
| | | | | | | | | | | | | | | | | | | | | | | v2: add support for geometry shaders set idx add some missing mappings fix for 64bit inputs/outputs fix up some FP color output index messup parse centroid flag v3: fix arrays in outputs as well fix input/ouput size calculation for tessellation shaders v4: add getSlotAddress helper fix for 64 bit typed inputs v5: change getSlotAddress interface for easier use fix sample inputs fix slot counting for mat v7: fix driver_location of images v8: don't require C++11 features v9: convert to C++ style comments support VERT_ATTRIB_POINT_SIZE add more error checking to slots Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: add nir type helper functionsKarol Herbst2019-03-171-0/+127
| | | | | | | | | | | | | v4: treat imul as unsigned v5: remove pointless !! v7: inot is unsigned as well v8: don't require C++11 features v9: convert to C++ style comments improve formatting print error in all cases where codegen doesn't support a given type Signed-off-by: Karol Herbst <[email protected]> Acked-by: Pierre Moreau <[email protected]>
* nv50/ir/nir: track defs and provide easy access functionsKarol Herbst2019-03-171-0/+150
| | | | | | | | | | | | | v2: add helper function for indirects v4: add new getIndirect overload for easier use v5: use getSSA for ssa values we can just create the values for unassigned registers in getSrc v6: always create at least 32 bit values v8: don't require C++11 features v9: include unordered_map on supported stdlibs replace '(*it).' with 'it->' Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: run some passes to make the conversion easierKarol Herbst2019-03-171-0/+42
| | | | | | | | | | | | v2: add constant_folding v6: print non final NIR only for verbose debugging v8: add passes we will need for OpenCL compute shaders v9: move type_size into anonymous namespace convert to C++ style comments lower bools to int32 Signed-off-by: Karol Herbst <[email protected]> Acked-by: Pierre Moreau <[email protected]>
* nouveau: fix nir and TGSI shader cache collisionKarol Herbst2019-03-172-1/+10
| | | | | | | | v9: rename variable to driver_flags use constants for shader cache flags Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* nouveau: add support for nirKarol Herbst2019-03-1715-23/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | not all those nir options are actually required, it just made the work a little easier. v2: fix asserts parse compute shaders don't lower bitfield_insert v3: fix memory leak v4: don't lower fmod32 v5: set lower_all_io_to_temps to false fix memory leak because we take over ownership of the nir shader merge: use the lowering helper v6: include TGSI debug header for proper assert call add nv50 support v7: fix Automake build v8: free shader only for the set shader type v9: check for IR type inside get_compiler_options squash "nouveau: add env var to make nir default" fix memory leak when creating compute shaders use debug_get_bool_option as it is available in non debug builds return failure if unsupported IR is encountered don't lower fpow in nir lower int 64 divmod inside nir to prevent crashes Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* nv50/ir: add lowering helperKarol Herbst2019-03-174-0/+332
| | | | | | | | | | | | | | | | if we start supporting multiple input IRs we might want to move lowering code into a common place and keep the initial translation simplier. This will also allows us to react on ISA changes more easily. v5: also handle SAT v6: rename type variables fixed lowering of NEG add lowering of NOT v8: don't require C++11 features Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* nv50/ir: move common converter code in base classKarol Herbst2019-03-175-103/+172
| | | | | | | v2: remove TGSI related bits Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* nvc0: print the shader type when dumping headersKarol Herbst2019-03-171-0/+1
| | | | | | | this makes debugging the shader header a little easier Acked-by: Pierre Moreau <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* radeonsi: Remove implicit const cast.Bas Nieuwenhuizen2019-03-171-1/+1
| | | | | Fixes: b9e02fe138e "gallium: add pipe_grid_info::last_block" Reviewed-by: Eric Engestrom <[email protected]>
* gitlab-ci: Build turnip.Bas Nieuwenhuizen2019-03-161-1/+2
| | | | | | | | | | No autotools build to care about. The half baked turnips param is kind of ugly, but felt like a waste defining more variables for it now. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: Deconflict vk_format_table regenerationBas Nieuwenhuizen2019-03-162-6/+6
| | | | | | | | | | | | Avoids src/freedreno/vulkan/meson.build:42:0: ERROR: Tried to create target "vk_format_table.c", but a target of that name already exists. when building both radv and turnip. Fixes: 26380b3a9f8 "turnip: Add driver skeleton (v2)" Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: Fix GCC compiles.Bas Nieuwenhuizen2019-03-161-6/+3
| | | | | | | | | | Apparently GCC does not consider static const variables to be integer constants, and hence the array size and the static assert result in compile failures. Fixes: 4b9f967cd1a "turnip: add a more complete format table" Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* intel/nir: Lower array-deref-of-vector UBO and SSBO loadsJason Ekstrand2019-03-151-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a serious performance issue with DXVK: https://github.com/doitsujin/dxvk/issues/937 This was caused by a recent change that to improve performance on RADV which back-fired on ANV and killed performance for some apps: https://github.com/doitsujin/dxvk/commit/e5a06d3f4a103a54cd4eb51970fedee405d1d698 Throwing in this bit of lowering lets us come along and CSE those UBO loads (or copy-prop for SSBO load) and get one load where we previously would have gotten several. VkPipeline-db results on Kaby Lake: total instructions in shared programs: 5115361 -> 5073185 (-0.82%) instructions in affected programs: 1754333 -> 1712157 (-2.40%) helped: 5331 HURT: 63 total cycles in shared programs: 2544501169 -> 2481144545 (-2.49%) cycles in affected programs: 2531058653 -> 2467702029 (-2.50%) helped: 9202 HURT: 4323 total loops in shared programs: 3340 -> 3331 (-0.27%) loops in affected programs: 9 -> 0 helped: 9 HURT: 0 total spills in shared programs: 3246 -> 3053 (-5.95%) spills in affected programs: 384 -> 191 (-50.26%) helped: 10 HURT: 5 total fills in shared programs: 4626 -> 4452 (-3.76%) fills in affected programs: 439 -> 265 (-39.64%) helped: 10 HURT: 5 All of the shaders with hurt spilling were in Rise of the Tomb Raider which also had shaders solidly helped in the spilling department. Not shown in those results (because I've not had success dumping the shaders) is Witcher 3 where this reduces spilling and improves over-all perf by around 20-25%. There were no shader-db changes. Apparently, this just isn't a pattern that happens in OpenGL. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Cc: "19.0" [email protected]
* nir: Add a new pass to lower array dereferences on vectorsJason Ekstrand2019-03-154-0/+202
| | | | | | | | This pass was originally written for lowering TCS output reads and writes but it is also applicable just about anything including UBOs, SSBOs, and shared variables. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* nir/builder: Add a vector extract helperJason Ekstrand2019-03-152-6/+30
| | | | | | | | | This one's a tiny bit better than what we had in spirv_to_nir because it emits a binary tree rather than a linear walk. It also doesn't leave around unneeded bcsel instructions for a constant index and returns an undef for constant OOB access. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* softpipe: Enable PIPE_CAP_MIXED_COLORBUFFER_FORMATSGert Wollny2019-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |    It seems softpipe actually supports this. This change enables the following piglits as passing without regressions in the gpu test set: gl-3.1-mixed-int-float-fbo gl-3.1-mixed-int-float-fbo int_second fbo-blending-format-quirks Changes for deqp: dEQP-GLES2.functional.fbo.completeness.attachment_combinations.rbo_tex_none_none QualityWarning -> Pass dEQP-GLES2.functional.fbo.completeness.attachment_combinations.rbo_tex_none_rbo QualityWarning -> Pass dEQP-GLES2.functional.fbo.completeness.attachment_combinations.rbo_tex_none_tex QualityWarning -> Pass dEQP-GLES2.functional.fbo.completeness.attachment_combinations.rbo_tex_rbo_none QualityWarning -> Pass dEQP-GLES2.functional.fbo.completeness.attachment_combinations.rbo_tex_tex_none QualityWarning -> Pass dEQP-GLES2.functional.fbo.completeness.attachment_combinations.tex_rbo_none_none QualityWarning -> Pass dEQP-GLES2.functional.fbo.completeness.attachment_combinations.tex_rbo_none_rbo QualityWarning -> Pass dEQP-GLES2.functional.fbo.completeness.attachment_combinations.tex_rbo_none_tex QualityWarning -> Pass dEQP-GLES2.functional.fbo.completeness.attachment_combinations.tex_rbo_rbo_none QualityWarning -> Pass dEQP-GLES2.functional.fbo.completeness.attachment_combinations.tex_rbo_tex_none QualityWarning -> Pass dEQP-GLES3.functional.fbo.completeness.samples.rbo0_rbo0_tex Fail -> Pass dEQP-GLES3.functional.fbo.completeness.samples.rbo0_tex_none Fail -> Pass dEQP-GLES3.functional.fbo.completeness.samples.rbo1_rbo1_rbo1 Fail -> Pass dEQP-GLES3.functional.fragment_out.random.* NotSupported -> Pass dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.*_fragment Fail -> Pass dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.*_vertex Fail -> Pass dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.*_fragment.* Fail -> Pass dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.*_vertex.* Fail -> Pass Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* freedreno/ir3/cp: fix ldib bugRob Clark2019-03-151-0/+6
| | | | | | | Something that we didn't hit earlier because of the extra shr.b Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* gallium/auxiliary/vl: Change weave compute shader implementationJames Zhu2019-03-151-17/+62
| | | | | | | | | | | | | Use 2D_ARRARY instead of RECT to fetch texels for weave compute shader. Problem 2,3: Fixed interpolation issue with weave de-interlace Fixes: 9364d66cb7f7 (Add video compositor compute shader render) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109646 Signed-off-by: James Zhu <[email protected]> Acked-by: Leo Liu <[email protected]> Tested-by: Bruno Milreu <[email protected]>
* gallium/auxiliary/vl: Change grid settingJames Zhu2019-03-151-4/+5
| | | | | | | | | Using draw area for grid setting instead of destination buffer size. Signed-off-by: James Zhu <[email protected]> Acked-by: Leo Liu <[email protected]> Tested-by: Bruno Milreu <[email protected]>