summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
Commit message (Collapse)AuthorAgeFilesLines
* radeonsi: generate GS prolog to (partially) fix triangle strip adjacency ↵Nicolai Hähnle2016-11-036-4/+149
| | | | | | | | | | | | | | | | | | | | rotation Fixes GL45-CTS.geometry_shader.adjacency.adjacency_indiced_triangle_strip and others. This leaves the case of triangle strips with adjacency and primitive restarts open. It seems that the only thing that cares about that is a piglit test. Fixing this efficiently would be really involved, and I don't want to use the hammer of degrading to software handling of indices because there may well be software that uses this draw mode (without caring about the precise rotation of triangles). v2: - skip the GS prolog entirely if workaround is not needed - only check for TES (TES is always non-null when tessellation is used) Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: remove si_shader_context::is_gs_copy_shaderNicolai Hähnle2016-11-032-8/+4
| | | | | | It has become redundant. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: make the GS copy shader owned by the GS selectorNicolai Hähnle2016-11-034-20/+31
| | | | | | | The copy shader only depends on the selector. This change avoids creating separate code paths for monolithic vs. non-monolithic geometry shaders. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: si_shader_vs only depends on the GS selectorNicolai Hähnle2016-11-031-2/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: si_vgt_gs_mode only depends on the selectorNicolai Hähnle2016-11-031-3/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: make si_generate_gs_copy_shader usable as a standalone functionNicolai Hähnle2016-11-031-36/+43
| | | | | | It really only depends on the shader selector. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: unify the si_compile_* functions for prologs and epilogsNicolai Hähnle2016-11-031-178/+61
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: get rid of no_{prolog,epilog}Nicolai Hähnle2016-11-032-153/+80
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: get rid of si_llvm_emit_fs_epilogueNicolai Hähnle2016-11-031-96/+1
| | | | | | It is no longer used. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: get rid of get_interp_paramNicolai Hähnle2016-11-031-52/+2
| | | | | | Replace by a simple LLVMGetParam, since ctx->no_prolog is always false. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: get rid of select_interp_paramNicolai Hähnle2016-11-031-41/+0
| | | | | | The condition !ctx->no_prolog is now always true. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use TCS epilog for monolithic shadersNicolai Hähnle2016-11-031-1/+21
| | | | | | | For fixed function TCS, we keep the copying of VS outputs to TES inputs inside the main function; the call to si_copy_tcs_inputs is moved accordingly. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: extract si_build_tcs_epilog_functionNicolai Hähnle2016-11-031-33/+46
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use VS epilog for monolithic TESNicolai Hähnle2016-11-031-0/+13
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use VS prolog and epilog for monolithic shadersNicolai Hähnle2016-11-031-2/+33
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: extract si_build_vs_{prolog,epilog}_functionNicolai Hähnle2016-11-031-67/+115
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use PS prolog for monolithic shadersNicolai Hähnle2016-11-031-10/+32
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: set num_input_vgprs for fragment shaders in create_functionNicolai Hähnle2016-11-031-6/+11
| | | | | | | So that the prolog generated for monolithic fragment shaders will have the right signature. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: extract si_build_ps_prolog_functionNicolai Hähnle2016-11-031-139/+171
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use PS epilog for monolithic shadersNicolai Hähnle2016-11-031-0/+207
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: extract si_build_ps_epilog_functionNicolai Hähnle2016-11-031-35/+60
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: pass the function name to si_llvm_create_funcNicolai Hähnle2016-11-033-8/+11
| | | | | | | We will use multiple functions in one module, so they should have different names. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: split is_monolithic into no_prolog and no_epilogNicolai Hähnle2016-11-032-17/+33
| | | | | | | | | | This helps to achieve a gradual transition towards building monolithic shaders via inlining. no_prolog and no_epilog will be removed by the end of the series, separate_prolog remains in use to control the PS input mapping. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: free data structures when shader compiles failNicolai Hähnle2016-11-031-11/+11
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: move main TGSI translation into its own functionNicolai Hähnle2016-11-031-45/+58
| | | | | | | The idea is that adding prolog and epilog code will be pulled out into the caller. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: add always-inline pass to si_llvm_finalize_moduleNicolai Hähnle2016-11-031-5/+5
| | | | | | | Change the pass manager as well, since this is a module-level pass. No noticeable run-time difference on shader-db. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: fix signature of export intrinsic in VS epilogNicolai Hähnle2016-11-031-3/+3
| | | | | | | The incompatible signature becomes an issue when the VS epilog gets merged with the main vertex shader at the IR level. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: link against amd_commonNicolai Hähnle2016-11-031-0/+1
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: fix BFE/BFI lowering for GLSL semanticsNicolai Hähnle2016-11-021-3/+34
| | | | | | | Fixes spec/arb_gpu_shader5/execution/built-in-functions/*-bitfield{Extract,Insert} Cc: 13.0 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon: add enum radeon_micro_modeMarek Olšák2016-11-011-2/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: remove r600_surface::level_infoMarek Olšák2016-11-011-4/+6
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: add radeon_surf::is_linearMarek Olšák2016-11-012-4/+3
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: remove radeon_surf_level::pitch_bytesMarek Olšák2016-11-012-4/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: don't call u_format helpers if we have that info alreadyMarek Olšák2016-11-011-2/+3
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: replace radeon_surf_info::dcc_enabled with num_dcc_levelsMarek Olšák2016-11-013-5/+5
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: add a driver query for counting CP DMA callsMarek Olšák2016-11-011-0/+4
| | | | | | | CP DMA calls are synchronous with regard to shaders, but can be made asynchronous if needed. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: add a driver query for shader cache hitsMarek Olšák2016-11-011-1/+5
| | | | | | This is an 8-month old patch. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: fix behavior of GLSL findLSB(0)Marek Olšák2016-10-291-4/+13
| | | | | | | 12.0 and older need the same fix but elsewhere. Cc: 13.0 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: set VGT_GS_ONCHIP_CNTL on CIK and laterMarek Olšák2016-10-291-0/+8
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Cc: 11.2 12.0 13.0 <[email protected]>
* radeonsi: remove si_resource_create_customMarek Olšák2016-10-265-20/+11
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: stop using PIPE_BIND_CUSTOMMarek Olšák2016-10-265-12/+9
| | | | | | it has no effect whatsoever Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: don't do (fmask.size && cmask.size)Marek Olšák2016-10-261-1/+1
| | | | | | fmask implies that cmask is present too. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: rename bo_size -> surf_size, bo_alignment -> surf_alignmentMarek Olšák2016-10-261-1/+1
| | | | | | these names were misleading. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: remove unnecessary fields from radeon_surf_levelMarek Olšák2016-10-261-4/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: stop using some input fields from radeon_surfaceMarek Olšák2016-10-261-2/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: use r600_gfx_write_event_eop everywhereMarek Olšák2016-10-261-9/+3
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: make r600_gfx_write_fence more genericMarek Olšák2016-10-261-1/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: enable SDMA on Carrizo and all CIK chips againMarek Olšák2016-10-261-10/+0
| | | | | | | | SDMA might be fixed by: "winsys/amdgpu: fix radeon_surf::macro_tile_index for imported textures" Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: add PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERSIlia Mirkin2016-10-221-0/+1
| | | | | | | | | | | | | | This allows the driver to signal that it can't handle random interleaving of attributes across buffers. This is required for ARB_transform_feedback3, and it's initialized to whatever the previous value of PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME was except for nv50 where it is disabled. Note that the proprietary drivers never expose ARB_transform_feedback3 on any GT21x's (where nouveau previously did), and after some effort I was unable to get it to work. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: fix a regression in si_eliminate_const_outputNicolai Hähnle2016-10-211-4/+3
| | | | | | | | | | A constant value of float type is not necessarily a ConstantFP: it could also be a constant expression that for some reason hasn't been folded. This fixes a regression in GL45-CTS.arrays_of_arrays_gl.InteractionFunctionCalls2 that was introduced by commit 3ec9975555d1cc5365413ad9062f412904f944a3. Reviewed-by: Marek Olšák <[email protected]>