summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl: fix optimization of discard nested multiple levelsNicolai Hähnle2016-07-281-1/+8
| | | | | | | | | | | | The order of optimizations can lead to the conditional discard optimization being applied twice to the same discard statement. In this case, we must ensure that both conditions are applied. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96762 Cc: [email protected] Tested-by: Kai Wasserbäch <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st_glsl_to_tgsi: only skip over slots of an input array that are presentNicolai Hähnle2016-07-281-1/+5
| | | | | | | | | | When an application declares varying arrays but does not actually do any indirect indexing, some array indices may end up unused in the consuming shader, so the number of input slots that correspond to the array ends up less than the array_size. Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* clover: make GCC 4.8 happyDieter Nützel2016-07-271-1/+1
| | | | | | | | | | | | | | | Without this GCC 4.8.x throws below error: error: invalid initialization of non-const reference of type 'clover::llvm::compat::raw_ostream_to_emit_file {aka llvm::raw_svector_ostream&}' from an rvalue of type '<brace-enclosed initializer list>' v2: change commit title and add error message like Eric Engestrom requested Signed-off-by: Dieter Nützel <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97019 [ Francisco Jerez: Trivial formatting fix. ] Reviewed-by: Francisco Jerez <[email protected]>
* i965: remove unnecessary null checkTimothy Arceri2016-07-281-4/+1
| | | | | | | | We would have hit a segfault already if this could be null. Fixes Coverity warning spotted by Matt. Reviewed-by: Matt Turner <[email protected]>
* glsl: free hash tables earlierTimothy Arceri2016-07-281-7/+3
| | | | | | | These are only used by get_matching_input() which has been call at this point so free the hash tables. Reviewed-by: Iago Toral Quiroga <[email protected]>
* nvc0: enable ARB_tessellation_shader on GM107+Samuel Pitoiset2016-07-271-3/+0
| | | | | | | This exposes OpenGL 4.1 on Maxwell (tested on GM107 and GM206). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gm107/ir: add a legalize SSA pass for PFETCHSamuel Pitoiset2016-07-274-2/+43
| | | | | | | PFETCH, actually ISBERD on GM107+ ISA only accepts a GPR for src0. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: fix up TCP header on GM107+Samuel Pitoiset2016-07-271-0/+9
| | | | | | | | | | The number of outputs patch (limited to 255) has moved in the TCP header, but blob seems to also set the old position. Also, the high 8-bits are now located inbetween the min/max parallel output read address at position 20. Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* vbo: Fix handling of POS/GENERIC0 attributes.Mathias Fröhlich2016-07-271-3/+16
| | | | | | | | | | | | | In case of split primitives we need to restore the original setting of the vtx.attrsz array to make immediate mode attribute array tracking work. v2: Use bool instead of boolean. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96950
* radeon/llvm: Use alloca instructions for larger arrays [revert a revert]Marek Olšák2016-07-262-25/+149
| | | | | | This reverts commit f84e9d749fbb6da73a60fb70e6725db773c9b8f8. Bioshock Infinite no longer hangs.
* r600g: add support for B5G6R5 PBO uploads via texture buffers (v2)Marek Olšák2016-07-261-0/+6
| | | | | | v2: set endian swap to 16 untested
* radeonsi: pre-generate shader logs for ddebugMarek Olšák2016-07-264-6/+34
| | | | | | | | This cuts down the overhead of si_dump_shader when ddebug is capturing shader logs, which is done for every draw call unconditionally (that's quite a lot of work for a draw call). Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: add empty lines after shader statsMarek Olšák2016-07-261-1/+1
| | | | | | to separate individual shaders dumped consecutively. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: move the shader key dumping to si_shader_dumpMarek Olšák2016-07-263-5/+9
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* ddebug: implement pipelined hang detection modeMarek Olšák2016-07-264-4/+567
| | | | | | | | | | | | | | | | | | | | | | For good performance while being able to generate decent hang reports. The report doesn't contain the parsed IB and the buffer list, but it isolates the draw call and dumps shaders while not having to flush the context. This is for GPU hangs that are harder to reproduce and require interactive playing for minutes or even hours. dd_pipe.h explains some implementation details. Initializing, copying (recording) and clearing states is most of the code. The performance should be at least 50% of the normal performance depending on the circumstances. (i.e. 50% is expected to be the worst case scenario, not the best case) The majority of time is spent in dump_debug_state(PIPE_DUMP_CURRENT_SHADERS) and that's after all the optimizations in later patches. There is no obvious way to optimize that further. Reviewed-by: Nicolai Hähnle <[email protected]>
* ddebug: don't save pointers to call parametersMarek Olšák2016-07-262-6/+6
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* ddebug: move dd_call into dd_pipe.hMarek Olšák2016-07-262-66/+66
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* ddebug: separate draw call dumping logicMarek Olšák2016-07-261-21/+26
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* ddebug: move all states into a separate structureMarek Olšák2016-07-263-129/+140
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* ddebug: write contents of dmesg into hang reportsMarek Olšák2016-07-261-4/+25
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* ddebug: implement create_batch_queryMarek Olšák2016-07-261-0/+27
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* ddebug: don't use abort()Marek Olšák2016-07-261-1/+1
| | | | | | We don't want a core dump. Reviewed-by: Nicolai Hähnle <[email protected]>
* ddebug: make dd_get_file_stream accept the screen onlyMarek Olšák2016-07-261-7/+8
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* ddebug: clean up ddebug_screen_createMarek Olšák2016-07-261-16/+23
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: rework flags for pipe_context::dump_debug_stateMarek Olšák2016-07-264-17/+34
| | | | | | | | The pipelined hang detection mode will not want to dump everything. (and it's also time consuming) It will only dump shaders after a draw call and then dump the status registers separately if a hang is detected. Reviewed-by: Nicolai Hähnle <[email protected]>
* vc4: add hash table look-up for exported dmabufsRob Herring2016-07-264-3/+56
| | | | | | | | | | | | | It is necessary to reuse existing BOs when dmabufs are imported. There are 2 cases that need to be handled. dmabufs can be created/exported and imported by the same process and can be imported multiple times. Copying other drivers, add a hash table to track exported BOs so the BOs get reused. v2: Whitespace fixup (by anholt) Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* vc4: Disable early Z with computed depth.Eric Anholt2016-07-263-2/+11
| | | | | We don't tell the hardware whether we're computing depth, so we need to manage early Z state manually. Fixes piglit early-z.
* ttn: Update shader->info as we generate code.Eric Anholt2016-07-261-0/+13
| | | | | | | We could use the nir_shader_gather_info() pass to update it after the fact, but this is what glsl_to_nir and prog_to_nir do. Reviewed-by: Rob Clark <[email protected]>
* mesa: standardize naming Mesa3D, MESA -> MesaVedran Miletić2016-07-264-5/+5
| | | | | Signed-off-by: Vedran Miletić <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* mesa: Make MESA_SHADER_CAPTURE_PATH skip shaders with Name == -1.Kenneth Graunke2016-07-261-1/+1
| | | | | | | | Shaders with shProg->Name == ~0 (aka 4294967295) are internal meta shaders that we don't really want to capture. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: Use AC_HEADER_MAJOR to include correct header for major().Matt Turner2016-07-264-4/+18
| | | | | | Gentoo has been smoke testing an upcoming change to glibc. Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=580392
* glsl: Remove references to tail_pred.Matt Turner2016-07-261-9/+9
|
* glx: Avoid aliasing violations.Matt Turner2016-07-262-24/+25
| | | | | | | | Compilers are perfectly capable of generating efficient code for calls like these to memcpy(). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Avoid aliasing violation in uniform_query.cpp.Matt Turner2016-07-261-14/+31
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Avoid aliasing violation in FXT1.Matt Turner2016-07-261-2/+2
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* swrast: Avoid aliasing violation.Matt Turner2016-07-261-2/+2
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Avoid aliasing violations.Matt Turner2016-07-262-10/+4
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Separate overlapping sentinel nodes in exec_list.Matt Turner2016-07-2625-137/+165
| | | | | | | | | | | I do appreciate the cleverness, but unfortunately it prevents a lot more cleverness in the form of additional compiler optimizations brought on by -fstrict-aliasing. No difference in OglBatch7 (n=20). Co-authored-by: Davin McCall <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/miptree: Stop multiplying cube depth by 6 in HiZ calculationsJason Ekstrand2016-07-261-17/+2
| | | | | | | | | intel_mipmap_tree::logical_depth0 is now in number of 2D slices so we no longer need to be multiplying by 6. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Cc: "12.0" <[email protected]>
* i965/miptree/isl: Stop multiplying depth by 6 for cubesJason Ekstrand2016-07-261-5/+0
| | | | | | | | | | Now that the logical_depth0 field is in number of 2D slices, we don't need to be multiplying by 6 when creating the surface. It wasn't hurting anything primarily because we get the actual length from the view which was already handling it correctly. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/blorp/gen8: Stop multiplying depth by 6 for cubesJason Ekstrand2016-07-261-4/+1
| | | | | | | | intel_mipmap_tree::logical_depth0 is now in 2-D slices so there is no need for us to multiply by 6 when we go to fill out a blorp surface state. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* nvc0: use nvc0_m2mf_push_linear() to reduce code duplicationSamuel Pitoiset2016-07-261-13/+3
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: use nve4_p2mf_push_linear() to reduce code duplicationSamuel Pitoiset2016-07-261-36/+9
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* build: Remove unused AX_CHECK_COMPILE_FLAG macroAndreas Boll2016-07-251-72/+0
| | | | | | | | Unused since 1a6ae840413d7fb6d2e83f6a83081d5246c7ac9e Signed-off-by: Andreas Boll <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* main: memcpy larger chunks in _mesa_propagate_uniforms_to_driver_storageNils Wallménius2016-07-251-6/+23
| | | | | | | | | | | | | | | | When possible, do the memcpy on larger blocks. This reduces cycles spent in _mesa_propagate_uniforms_to_driver_storage from 1.51 % to 0.62% according to perf during the Unigine Heaven benchmark. It did not affect the framerate of the benchmark. The system used for testing was an i5 6600K with a Radeon R9 380. Piglit hangs randomly on this system both with and without the patch so i could not make a comparison. v2: fixed whitespace Signed-off-by: Nils Wallménius <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/va: enable h264 VAAPI encodeBoyuan Zhang2016-07-251-5/+1
| | | | | | Enable H.264 VAAPI encoding through config. Currently only H.264 baseline is supported. Encode entrypoint is not accepted by driver. Signed-off-by: Boyuan Zhang <[email protected]>
* st/va: add function to handle misc param type frame rateBoyuan Zhang2016-07-251-5/+19
| | | | | | Frame rate can be passed to driver either through VAEncSequenceParameterBufferType or VAEncMiscParameterTypeFrameRate. Previous code only implement the former one, which is used by Gstreamer-Vaapi. Now adding implementation for VAEncMiscParameterTypeFrameRate. Also adding default frame rate as 30 just in case application never provides frame rate information to driver. Signed-off-by: Boyuan Zhang <[email protected]>
* st/va: add enviromental variable to disable interlaceBoyuan Zhang2016-07-251-0/+4
| | | | | | Add environmental variable to disable interlace mode. At VAAPI decoding stage, driver can not distinguish b/w pure decoding case and transcoding case. And since interlace encoding is not supported, we have to disable interlace for transcoding case. The temporary solution is to use enviromental variable to disable interlace mode. Signed-off-by: Boyuan Zhang <[email protected]>
* st/va: add preset values for VAAPI encodeBoyuan Zhang2016-07-251-0/+27
| | | | | | Add some hardcoded values hardware needs mainly for rate control purpose. With previously hardcoded values for OMX, the rate control result is not correct. This change fixed the rate control result by setting correct values for Vaapi. Signed-off-by: Boyuan Zhang <[email protected]>
* st/va: add functions for VAAPI encodeBoyuan Zhang2016-07-253-2/+178
| | | | | | Add necessary functions/changes for VAAPI encoding to buffer and picture. These changes will allow driver to handle all Vaapi encode related operations. This patch doesn't change the Vaapi decode behaviour. Signed-off-by: Boyuan Zhang <[email protected]>