summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* radv: only emit ps_input_cntl is we have any to outputDave Airlie2017-03-281-3/+6
| | | | | | | Otherwise we get GPU hangs. Reported-by: Alex Smith <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glx: Remove #include <GL/glxint.h>Adam Jackson2017-03-281-1/+0
| | | | | | | We're not using anything in it, and we don't want to inherit struct definitions from some other package anyway. Signed-off-by: Adam Jackson <[email protected]>
* r600g: check NULL return from r600_aligned_buffer_createJulien Isorce2017-03-281-0/+10
| | | | | Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st_cb_bitmap: check NULL return from u_upload_allocJulien Isorce2017-03-281-0/+6
| | | | | | Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* si_compute: check NULL return from u_upload_allocJulien Isorce2017-03-281-3/+11
| | | | | Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: check NULL return from u_upload_allocJulien Isorce2017-03-281-0/+4
| | | | | | | | | | | | | | Like done in si_state_draw.c::si_draw_vbo u_upload_alloc can fail, i.e. set output param *ptr to NULL, for 2 reasons: alloc fails or map fails. For both there is already a fprintf/stderr in radeon_create_bo and radeon_bo_do_map. In src/gallium/drivers/ it is a common usage to just avoid to crash by doing a silent check. But defer fprintf where the error comes from, libdrm calls. Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* swr: fix llvm-5.0.0 build bustageTim Rowley2017-03-281-9/+15
| | | | | | | Handle rename of llvm AttributeSet to AttributeList in the same fashion as ac_llvm_helper.cpp. Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer jitter] fix llvm-5.0.0 build bustageTim Rowley2017-03-281-4/+3
| | | | | | Add CreateAlignmentAssumptionHelper to gen_llvm_ir_macros.py ignore list. Reviewed-by: Bruce Cherniak <[email protected]>
* isl: Drop unused isl_surf_init_info::min_pitchChad Versace2017-03-282-13/+3
| | | | | | Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* intel: Fix requests for exact surface row pitch (v2)Chad Versace2017-03-283-18/+21
| | | | | | | | | | | | | | All callers of isl_surf_init() that set 'min_row_pitch' wanted to request an *exact* row pitch, as evidenced by nearby asserts, but isl lacked API for doing so. Now that isl has an API for that, update the code to use it. v2: Assert that isl_surf_init() succeeds because the callers assume it. [for jekstrand] Reviewed-by: Nanley Chery <[email protected]> (v1) Reviewed-by: Anuj Phogat <[email protected]> (v1) Reviewed-by: Jason Ekstrand <[email protected]> (v2)
* isl: Let isl_surf_init's caller set the exact row pitch (v2)Chad Versace2017-03-282-1/+19
| | | | | | | | | The caller does so by setting the new field isl_surf_init_info::row_pitch. v2: Validate the requested row_pitch. Reviewed-by: Jason Ekstrand <[email protected]> (v2)
* isl: Validate the calculated row pitch (v45)Chad Versace2017-03-281-6/+64
| | | | | | | | | | | | | | | | | | | | | | | | Validate that isl_surf::row_pitch fits in the below bitfields, if applicable based on isl_surf::usage. RENDER_SURFACE_STATE::SurfacePitch RENDER_SURFACE_STATE::AuxiliarySurfacePitch 3DSTATE_DEPTH_BUFFER::SurfacePitch 3DSTATE_HIER_DEPTH_BUFFER::SurfacePitch v2: -Add a Makefile dependency on generated header genX_bits.h. v3: - Test ISL_SURF_USAGE_STORAGE_BIT too. [for jekstrand] - Drop explicity dependency on generated header. [for emil] v4: - Rebase for new gen_bits_header.py script. - Replace gen_10x with gen_device_info*. v5: - Drop FINISHME for validation of GEN9 1D row pitch. [for jekstrand] - Reformat bit tests. [for jekstrand] Reviewed-by: Jason Ekstrand <[email protected]> (v4)
* genxml: New generated header genX_bits.h (v6)Chad Versace2017-03-285-3/+300
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | genX_bits.h contains the sizes of bitfields in genxml instructions, structures, and registers. It also defines some functions to query those sizes. isl_surf_init() will use the new header to validate that requested pitches fit in their destination bitfields. What's currently in genX_bits.h: - Each CONTAINER::Field from gen*.xml that has a bitsize has a macro in genX_bits.h: #define GEN{N}_CONTAINER_Field_bits {bitsize} - For each set of macros whose name, after stripping the GEN prefix, is the same, genX_bits.h contains a query function: static inline uint32_t __attribute__((pure)) CONTAINER_Field_bits(const struct gen_device_info *devinfo); v2 (Chad Versace): - Parse the XML instead of scraping the generated gen*_pack.h headers. v3 (Dylan Baker): - Port to Mako. v4 (Jason Ekstrand): - Make the _bits functions take a gen_device_info. v5 (Chad Versace): - Fix autotools out-of-tree build. - Fix Android build. Tested with git://github.com/android-ia/manifest. - Fix macro names. They were all missing the "_bits" suffix. - Fix macros names more. Remove all double-underscores. - Unindent all generated code. (It was floating in a sea of whitespace). - Reformat header to appear human-written not machine-generated. - Sort gens from high to low. Newest gens should come first because, when we read code, we likely want to read the gen8/9 code and ignore the gen4 code. So put the gen4 code at the bottom. - Replace 'const' attributes with 'pure', because the functions now have a pointer parameter. - Add --cpp-guard flag. Used by Android. - Kill class FieldCollection. After Jason's rewrite, it was just a dict. v6 (Chad Versace): - Replace `key not in d.keys()` with `key not in d`. [for dylan] Co-authored-by: Dylan Baker <[email protected]> Co-authored-by: Jason Ekstrand <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> (v5) Reviewed-by: Dylan Baker <[email protected]> (v6)
* swr: [rasterizer core] Disable inline function expansionTim Rowley2017-03-281-0/+12
| | | | | | Disable expansion in windows Debug builds. Reviewed-by: George Kyriazis <[email protected]>
* swr: [rasterizer common] Use C++ thread_local keywordTim Rowley2017-03-281-2/+2
| | | | | | Allows use of thread_local objects with constructors. Reviewed-by: George Kyriazis <[email protected]>
* swr: [rasterizer core] SIMD16 Frontend WIPTim Rowley2017-03-288-81/+371
| | | | | | Implement widened clipper and binner interfaces for SIMD16. Reviewed-by: George Kyriazis <[email protected]>
* swr: [rasterizer core] Don't bind single-threaded contextsTim Rowley2017-03-281-1/+1
| | | | Reviewed-by: George Kyriazis <[email protected]>
* swr: [rasterizer core] Enable SIMD16Tim Rowley2017-03-283-8/+20
| | | | | | Make the AVX512 insert/extract intrinsics KNL-compatible Reviewed-by: George Kyriazis <[email protected]>
* swr: [rasterizer jitter] Clean up EngineBuilder constructionTim Rowley2017-03-281-7/+5
| | | | Reviewed-by: George Kyriazis <[email protected]>
* swr: [rasterizer codegen] add cmdline to archrast gen filesTim Rowley2017-03-285-2/+18
| | | | Reviewed-by: George Kyriazis <[email protected]>
* swr: [rasterizer core] SIMD16 Frontend WIPTim Rowley2017-03-282-22/+136
| | | | | | Fix GS and streamout. Reviewed-by: George Kyriazis <[email protected]>
* swr: [rasterizer codegen] Refactor codegenTim Rowley2017-03-287-158/+215
| | | | | | | | | Move common codegen functions into gen_common.py. v2: change gen_knobs.py to find the template file internally, like the rest of the gen scripts. Reviewed-by: Bruce Cherniak <[email protected]>
* tests/cache_test: allow crossing mount pointsJuan A. Suarez Romero2017-03-281-1/+1
| | | | | | | | | | | When using an overlayfs system (like a Docker container), rmrf_local() fails because part of the files to be removed are in different mount points (layouts). And thus cache-test fails. Letting crossing mount points is not a big problem, specially because this is just for a test, not to be used in real code. Reviewed-by: Nicolai Hähnle <[email protected]>
* glcpp/tests/glcpp-test-cr-lf: error out if we cannot find any testsEmil Velikov2017-03-281-0/+5
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glcpp/tests/glcpp-test-cr-lf: correctly set/use srcdir/abs_builddirEmil Velikov2017-03-281-14/+17
| | | | | | | | | | | | Otherwise manual invokation of the script from elsewhere than `dirname $0` will fail. With these all the artefacts should be created in the correct location, and thus we can remove the old (and slighly strange) clean-local line. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glcpp/tests: update testname in help stringEmil Velikov2017-03-282-2/+2
| | | | | | | | | Rather than hardcoding glcpp/other use `basename "$0"` which expands appropriatelly. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glcpp/tests/glcpp-test: error out if we cannot find any testsEmil Velikov2017-03-281-0/+5
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glcpp/tests/glcpp-test: print only the test basenameEmil Velikov2017-03-281-2/+2
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glcpp/tests/glcpp-test: set srcdir/abs_builddir variablesEmil Velikov2017-03-281-8/+15
| | | | | | | | | | | | Current definitions work fine for the manual invokation of the script, although the whole script does not consider that one can run it OOT. The latter will be handled with latter patches, although it will be extensively using the two variables. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/optimization-test: 'echo' only folders which has generatorsEmil Velikov2017-03-281-1/+1
| | | | | | | | The current "let's print any folder which exists" is simply confusing. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/optimization-test: print only the test basedir/nameEmil Velikov2017-03-281-1/+1
| | | | | | | | | The relative/absolute path brings little to no benefit in being printed as testname. Trim it out. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/optimization-test: error if zero tests were executedEmil Velikov2017-03-281-0/+5
| | | | | | | | | We don't want to lie ourselves that 'everything is fine' when no tests were found/ran. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/optimization-test: pass glsl_test as argumentEmil Velikov2017-03-282-3/+8
| | | | | | | | | | | | Rather than hardcoding the binary location (which ends up wrong in a number of occasions) in the python script, pass it as argument. This allows us to remove a couple of dirname/basename workarounds that aimed to keep this working, and succeeded in the odd occasion. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/optimization-test: error out if we fail to generate any testsEmil Velikov2017-03-281-1/+12
| | | | | | | | v2: use -eq over a string comparison (Eric) Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/optimization-test: correctly manage srcdir/builddirEmil Velikov2017-03-282-4/+19
| | | | | | | | | | | | | | | | | | At the moment we look for generator script(s) in builddir while they are in srcdir, and we proceed to generate the tests and expected output in srcdir, which is not allowed. To untangle: - look for the generator script in the correct place - generate the files in builddir, by extending create_test_cases.py to use --outdir With this in place the test passes `make check' for OOT builds - would that be as standalone or part of `make distcheck' Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/optimisation-test: ensure that compare_ir is availableEmil Velikov2017-03-281-0/+5
| | | | | | | | | | Bail out early if the script is not where we expect it to be. v2: use -f instead of -e. latter returns true on folder(s) Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/optimization-test: correctly set compare_irEmil Velikov2017-03-281-6/+2
| | | | | | | | | Now that we have srcdir we can use it to correctly manage/point to the script. Effectively fixing OOT invokation of `make check'. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/optimization-test: add fallback srcdir/abs_builddir definesEmil Velikov2017-03-281-0/+13
| | | | | | | | | There is no robust way to detect either one, so simply hope for the best and warn just in case. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/optimisation-test: make sure that $PYTHON2 is set/availableEmil Velikov2017-03-281-0/+10
| | | | | | | | | | Otherwise we'll fail when invoking the script outside of "make check" v2: use -ne over a string comparison (Eric) Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/warnings-test: print only the test basenameEmil Velikov2017-03-281-1/+1
| | | | | | | | | Spamming the log with the (in some cases extremely long) test location is of limited use. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/warnings-test: error if zero tests were executedEmil Velikov2017-03-281-0/+5
| | | | | | | | | We don't want to lie ourselves that 'everything is fine' when no tests were found/ran. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/warnings-test: correctly manage srcdir/builddirEmil Velikov2017-03-281-4/+8
| | | | | | | | | Before this commit, we would effectively fail to run any of the test in a OOT builds. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/warnings-test: add fallback srcdir/abs_builddir definesEmil Velikov2017-03-281-1/+14
| | | | | | | | | There is no robust way to detect either one, so simply hope for the best and warn just in case. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests/warnings-test: error out if glsl_compiler is missingEmil Velikov2017-03-281-0/+5
| | | | | | | | | | ... or non-executable, in particular. v2: use test -x (Eric) Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Eric Engestrom <[email protected]>
* glsl: automake: export abs_builddir for the testsEmil Velikov2017-03-281-0/+1
| | | | | | | | | We're going to use them with the next commits to determine where to put the generated tests and/or built binaries. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glsl/tests: automake: cleanup all artefacts during clean-localEmil Velikov2017-03-281-0/+6
| | | | | | | | | | | | | With later commits we'll fix the generators to produce the files in the correct location. That in itself will cause an issue since the files will be left dangling and make distcheck will fail. v2: Use -r only as needed (Eric) Cc: Matt Turner <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Eric Engestrom <[email protected]>
* st/va: remove assert for single sliceNayan Deshmukh2017-03-281-1/+1
| | | | | | | | | we anyway allow for multiple slices v2: do not remove assert to check for buf->size Signed-off-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* radeonsi: use DMA for clears with unaligned sizeNicolai Hähnle2017-03-281-19/+27
| | | | | | | | | | Only a small tail needs to be uploaded manually. This is only partly a performance measure (apps are expected to use aligned access). Mostly it is preparation for sparse buffers, which the old code would incorrectly have attempted to map directly. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: CP DMA clear supports unaligned destination addressesNicolai Hähnle2017-03-281-1/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: remove the early-out for SDMA in si_clear_bufferNicolai Hähnle2017-03-281-22/+21
| | | | | | | This allows the next patches to be simple while still being able to make use of SDMA even in some unusual cases. Reviewed-by: Marek Olšák <[email protected]>