summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* amd/common: add ac_is_sgpr_param helperNicolai Hähnle2016-11-032-0/+12
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* amd/common: build also for gallium driversNicolai Hähnle2016-11-033-2/+13
| | | | | | | | At least when LLVM is used, which is basically always (unless you're only building r600 without OpenCL). Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* amd/common: move llvm helper prototype to ac_llvm_util.hNicolai Hähnle2016-11-034-7/+13
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl: fix lowering of UBO references of named blocksNicolai Hähnle2016-11-031-5/+5
| | | | | | | | | | | | | | When a UBO reference has the form block_name.foo where block_name refers to a block where the first member has a non-zero offset, the base offset was incorrectly added to the reference. Fixes an assertion triggered in debug builds by GL45-CTS.enhanced_layouts.uniform_block_layout_qualifier_conflict. That test doesn't properly check for correct execution in this case, so I am also going to send out a piglit test. Cc: 13.0 <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* glsl: Update deref types when resizing implicitly sized arrays.Kenneth Graunke2016-11-031-23/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | At link time, we resolve the size of implicitly sized arrays. When doing so, we update the type of the ir_variables. However, we neglected to update the type of ir_dereference nodes which reference those variables. It turns out array_resize_visitor (for GS/TCS/TES interface array handling) already did 2/3 of the cases for this, so we can simply refactor the code and reuse it. This fixes: GL45-CTS.shader_storage_buffer_object.basic-syntax GL45-CTS.shader_storage_buffer_object.basic-syntaxSSO which have an SSBO containing an implicitly sized array, followed by some other members. setup_buffer_access uses the dereference types to compute offsets to fields, and it had a stale type where the implicitly sized array's length was still 0 instead of the actual length. While we're here, we can also fix update_array_sizes to properly update deref types as well, fixing a FINISHME from 2010. Cc: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glsl: delete previously linked shaders earlier when linkingTimothy Arceri2016-11-037-26/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the delete linked shaders call to _mesa_clear_shader_program_data() which makes sure we delete them before returning due to any validation problems. It also reduces some code duplication. From the OpenGL 4.5 Core spec: "If LinkProgram failed, any information about a previous link of that program object is lost. Thus, a failed link does not restore the old state of program. ... If one of these commands is called with a program for which LinkProgram failed, no error is generated unless otherwise noted. Implementations may return information on variables and interface blocks that would have been active had the program been linked successfully. In cases where the link failed because the program required too many resources, these commands may help applications determine why limits were exceeded." Therefore it's expected that we shouldn't be able to query the program that failed to link and retrieve information about a previously successful link. Before this change the linker was doing validation before freeing the previously linked shaders and therefore could exit on failure before they were freed. This change also fixes an issue in compat profile where a program with no shaders attached is expect to fall back to fixed function but was instead trying to relink IR from a previous link. Reviewed-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97715 Cc: "13.0" <[email protected]>
* nir: fix nir_shader_clone() and nir_sweep()Timothy Arceri2016-11-032-1/+9
| | | | | | | | | | These were broken in e1af20f18a8 when the info field in nir_shader was turned into a pointer. Clone was copying the pointer rather than the data and nir_sweep was cleaning up shader_info rather than claiming it. Reviewed-by: Eric Anholt <[email protected]>
* mesa: move shader_info to the start of gl_programTimothy Arceri2016-11-031-2/+3
| | | | | | | | | | This will allow use to use ralloc_parent() on the info field and fix a regression in nir_sweep() caused by e1af20f18a8. This is intended to be a temporary requirement that will be removed when we finish separating shader_info from nir_shader. Reviewed-by: Eric Anholt <[email protected]>
* st/mesa/r200/i915/i965: use rzalloc() to create gl_programTimothy Arceri2016-11-035-14/+21
| | | | | | | | | | | | | | | | | This allows us to use ralloc_parent() to see which data structure owns shader_info which allows us to fix a regression in nir_sweep(). This will also allow us to move some fields from gl_linked_shader to gl_program, which will allow us to do some clean-ups like storing gl_program directly in the CurrentProgram array in gl_pipeline_object enabling some small validation optimisations at draw time. Also it is error prone to depend on the gl_linked_shader for programs in current use because a failed linking attempt will free infomation about the current program. In i965 we could be trying to recompile a shader variant but may have lost some required fields. Reviewed-by: Eric Anholt <[email protected]>
* nv50,nvc0: stop limiting the number of active queries to 1Samuel Pitoiset2016-11-022-16/+12
| | | | | | | | | | | | | | This limitation was initially here because AMD_performance_monitor doesn't allow to expose the real number of hardware counters. But this actually really annoying when profiling with qapitrace. Anyways, performance counters are mostly for developers and failures are expected if you try to monitor more queries than supported. This breaks amd_performance_monitor_measure but it's expected. Signed-off-by: Samuel Pitoiset <[email protected]>
* nvc0: add new warp_nonpred_execution_efficiency metric on SM35Samuel Pitoiset2016-11-022-1/+37
| | | | | | | Event not_predicated_off_thread_inst_executed is SM35+. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: add missing metric-issue_slot on SM35Samuel Pitoiset2016-11-021-0/+1
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: do not expose metric-inst_issued twice on SM35Samuel Pitoiset2016-11-021-1/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: add new warp_execution_efficiency metric on SM30+Samuel Pitoiset2016-11-022-0/+24
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: respect 80-chars for perf metrics descriptionsSamuel Pitoiset2016-11-021-4/+4
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: sort performance metrics alphabeticallySamuel Pitoiset2016-11-021-4/+4
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* radv: add support for anisotropic filtering on VI+Fredrik Höglund2016-11-031-3/+27
| | | | | | | Ported from radeonsi. Cc: "13.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix dual source blendingDave Airlie2016-11-031-3/+9
| | | | | | | | | | | Dolphin tried to use this, but we hadn't had any tests for it properly. All that is required is the shader output format needs to be set for 0 and 1 exports. Cc: "13.0" <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nv50: add missing draw_calls_indexed driver statSamuel Pitoiset2016-11-021-0/+1
| | | | | | | Spotted when glancing at the VBO push code. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* glx/glvnd: Use bsearch() in FindGLXFunction instead of open-coding itAdam Jackson2016-11-021-18/+16
| | | | | Reviewed-by: Eric Engestrom <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* glx/glvnd: Fix dispatch function names and indicesAdam Jackson2016-11-022-146/+144
| | | | | | | | | As this array was not actually sorted, FindGLXFunction's binary search would only sometimes work. Cc: "13.0" <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* glx/glvnd: Don't modify the dummy slot in the dispatch tableAdam Jackson2016-11-021-0/+3
| | | | | | Cc: "13.0" <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* anv/pipeline: Properly cache prog_data::paramJason Ekstrand2016-11-023-14/+36
| | | | | | | | | | | Before we were caching the prog data but we weren't doing anything with brw_stage_prog_data::param so anything with push constants wasn't getting cached properly. This commit fixes that. Signed-off-by: Jason Ekstrand <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98012 Reviewed-by: Timothy Arceri <[email protected]> Cc: "13.0" <[email protected]>
* anv/pipeline: Put actual pointers in anv_shader_binJason Ekstrand2016-11-025-50/+45
| | | | | | | | | | | | | | | While we can simply calculate offsets to get to things such as the prog_data and the key, it's much more user-friendly if there are just pointers. Also, it's a bit more fool-proof. While we're at it, we rework the pipeline cache API to use the brw_stage_prog_data type directly. Signed-off-by: Jason Ekstrand <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98012 Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Cc: "13.0" <[email protected]>
* intel/blorp: Pass a brw_stage_prog_data to upload_shaderJason Ekstrand2016-11-025-6/+9
| | | | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98012 Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Cc: "13.0" <[email protected]>
* intel/blorp: Use wm_prog_data instead of hand-rolling our ownJason Ekstrand2016-11-025-66/+28
| | | | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98012 Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Cc: "13.0" <[email protected]>
* anv: Better handle return codes from anv_physical_device_initJason Ekstrand2016-11-021-1/+1
| | | | | | | | | | | | The case where we just want the loop to continue is INCOMPATIBLE_DRIVER because that simply means that whatever FD we opened isn't a supported Intel chip. Other error codes such as OUT_OF_HOST_MEMORY are actual errors and we should be returning early in that case. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Cc: "13.0" <[email protected]>
* vulkan/wsi/x11: Clean up connections in finish_wsiJason Ekstrand2016-11-021-0/+4
| | | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Cc: "13.0" <[email protected]>
* vulkan/wsi/x11: Better handle wsi_x11_connection_create failureJason Ekstrand2016-11-021-0/+2
| | | | | | | | | | Without this fix, the function would still end up returning NULL but it would put that NULL connection in the hash table which would be bad. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Cc: "13.0" <[email protected]>
* android: avoid using libdrm with host modulesChih-Wei Huang2016-11-021-0/+2
| | | | | | | | | | | | | | | | | | Note LOCAL_CFLAGS and LOCAL_SHARED_LIBRARIES in Android.common.mk are used by both host and target modules. However, commit 112e988 moved libdrm related flags to common. It causes the errors like: error: 'out/host/linux-x86/obj32/SHARED_LIBRARIES/libdrm_intermediates/export_includes', needed by 'out/host/linux-x86/obj32/EXECUTABLES/mesa_gen_matypes_intermediates/import_includes', missing and no known rule to make it No reason to use libdrm with host modules. Cc: "13.0" <[email protected]> Fixes: 112e988329b ("Android: move libdrm settings to top-level Android.common.mk") Signed-off-by: Chih-Wei Huang <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glsl: compute lvalues of [in]out parameters before inlined function bodyNicolai Hähnle2016-11-021-10/+81
| | | | | | | | | | | | | | | This is required when an out argument involves an array index that is either a global variable modified by the function or another out argument in the same function call. Fixes the shaders/out-parameter-indexing/vs-inout-index-inout-* tests. v2: - modify the ir_dereference_array nodes in place - use ir_hierarchical_visitor v3: use base_ir (Ian Romanick) Reviewed-by: Ian Romanick <[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]>
* tgsi: align the definition of BFI & [UI]BFE with GLSLNicolai Hähnle2016-11-021-20/+15
| | | | | | | | | | | | | | | As previously written, these opcodes use the SM5 semantics which is incompatible with GLSL when bits == 0, offset == 32. At some point we may want to add BFI_SM5 etc. opcodes, but all users currently either want (and expect!) the GLSL semantics or don't care. Bitfield inserts are generated by the GLSL lower_instructions and lower_packing_builtins passes with constant bits and offset arguments, so any workaround code that drivers may have to emit to follow GLSL semantics should be optimized away easily for those uses. Reviewed-by: Marek Olšák <[email protected]>
* radv: expose xlib platform extensionDave Airlie2016-11-021-0/+6
| | | | | | | | | I missed this when I added the xlib code, this allows dolphin emu to start and crash later. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "13.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* intel: aubinator: print field values if availableLionel Landwerlin2016-11-013-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turning this : sampler state 0 Sampler Disable: false Texture Border Color Mode: 0 LOD PreClamp Enable: 1 Base Mip Level: 0.000000 Mip Mode Filter: 0 Mag Mode Filter: 1 Min Mode Filter: 1 Texture LOD Bias: foo Anisotropic Algorithm: 0 into this : sampler state 0 Sampler Disable: false Texture Border Color Mode: 0 (DX10/OGL) LOD PreClamp Enable: 1 (OGL) Base Mip Level: 0.000000 Mip Mode Filter: 0 (NONE) Mag Mode Filter: 1 (LINEAR) Min Mode Filter: 1 (LINEAR) Texture LOD Bias: foo Anisotropic Algorithm: 0 (LEGACY) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Sirisha Gandikota<[email protected]>
* intel: aubinator: load fields values from xml dataLionel Landwerlin2016-11-012-0/+40
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Sirisha Gandikota<[email protected]>
* intel: aubinator: print boolean fields to true with colorsLionel Landwerlin2016-11-013-6/+17
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Sirisha Gandikota<[email protected]>
* amd: fix a typo in PIXEL_PIPE_STAT_RESET definitionMarek Olšák2016-11-011-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: add enum radeon_micro_modeMarek Olšák2016-11-013-7/+14
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: make it clear that DRM 2.x.x fast clear constraint is CIK-onlyMarek Olšák2016-11-011-2/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: remove r600_surface::level_infoMarek Olšák2016-11-013-7/+6
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: add radeon_surf::is_linearMarek Olšák2016-11-018-13/+15
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: remove radeon_surf_level::pitch_bytesMarek Olšák2016-11-0113-44/+48
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: don't call u_format helpers if we have that info alreadyMarek Olšák2016-11-012-10/+8
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: replace radeon_surf_info::dcc_enabled with num_dcc_levelsMarek Olšák2016-11-016-15/+19
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: add a driver query for counting CP DMA callsMarek Olšák2016-11-014-0/+13
| | | | | | | 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-014-1/+16
| | | | | | This is an 8-month old patch. Reviewed-by: Nicolai Hähnle <[email protected]>