aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* egl: don't NULL deref the .get_capabilities function pointerEmil Velikov2017-08-261-1/+2
| | | | | | | | | | | | | One could easily introduce version 3 of the DRI2fenceExtension, extending the struct, while not implementing the above function. Thus we'll end up with NULL pointer, and dereferencing it won't fare too well. Fixes: 0201f01dc4e ("egl: add EGL_ANDROID_native_fence_sync") Cc: Rob Clark <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mapi/gen: remove shebang from the marshal generator scriptsEmil Velikov2017-08-263-3/+0
| | | | | | | | | | | The scripts are invoked with the correct version of python and are missing the execute bit. Follow the rest of Mesa and drop the shebang line. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* dri_interface.h: add missing stdint.h includeEmil Velikov2017-08-261-0/+2
| | | | | | | | Required for uint32_t and friends. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* xmlconfig: use the portable __VA_ARGS__Emil Velikov2017-08-261-6/+6
| | | | | | | | | | | Follow the example used through mesa and use "..." + "__VA_ARGS__". The former tends to be more common and portable. v2: use ##__VA_ARGS__ (Eric) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/vbuf: fix buffer reference bugsBrian Paul2017-08-251-4/+3
| | | | | | | | | | | | | | | | | | In two places we called pipe_resource_reference() to remove a reference to a vertex buffer resource. But we neglected to check if the buffer was a user buffer and not a pipe_resource. This caused us to pass an invalid pipe_resource pointer to pipe_resource_reference(). Instead of calling pipe_resource_reference(&vbuf->resource, NULL), use pipe_vertex_buffer_unreference(&vbuf) which checks the is_user_buffer field and does the right thing. Also, explicity set the is_user_buffer field to false after setting the vbuf->resource pointer to out_buffer. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102377 Reviewed-by: Marek Olšák <[email protected]> Tested-by: Bruce Cherniak <[email protected]>
* docs: add an additional final cycle for 17.1Andres Gomez2017-08-261-1/+7
| | | | | | | | Cc: Emil Velikov <[email protected]> Cc: Juan A. Suarez Romero <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Juan A. Suarez Romero <[email protected]>
* docs: remove released and extend the calendar until the end of 2017Andres Gomez2017-08-261-4/+84
| | | | | | | | | | | | | Completed the 17.2 cycle and added the beginning of the 17.3 one. v2: Add 17.2-rc6 as tentative final version to be promoted to 17.2.0 final (Eric). Cc: Emil Velikov <[email protected]> Cc: Juan A. Suarez Romero <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Juan A. Suarez Romero <[email protected]>
* radv: Fix sparse BO mapping merging.Bas Nieuwenhuizen2017-08-251-0/+1
| | | | | | | | If we merge a mapping with the mapping before it, we also need to not only change the offset, but also the bo offset. Fixes: 715df30a4e2 "radv/amdgpu: Add winsys implementation of virtual buffers." Reviewed-by: Dave Airlie <[email protected]>
* radv: Fix off by one in MAX_VBS assert.Bas Nieuwenhuizen2017-08-251-1/+1
| | | | | | | | e.g. 0 + 32 <= 32 should be valid. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Tested-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Don't set a new subpass on compute resolve.Bas Nieuwenhuizen2017-08-251-8/+0
| | | | | | | We don't use the render path so totally unneeded. Fixes: 19be95f71e6 "radv: add subpass resolve compute path" Reviewed-by: Dave Airlie <[email protected]>
* radv: Remove some intel comments from the resolve code.Bas Nieuwenhuizen2017-08-253-21/+0
| | | | | | These are clearly not applicable to radv. Reviewed-by: Kenneth Graunke <[email protected]>
* egl/drm: Don't "fall back" to /dev/dri/card0 if the first open failsAdam Jackson2017-08-251-2/+0
| | | | | | | | The snprintf stuff here already constructs the right name for the device node, and if it doesn't, you configured Mesa wrong, don't do that. Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* i965: Use GEN_GEN and GEN_IS_HASWELL in genX_state_upload.c code.Kenneth Graunke2017-08-251-4/+4
| | | | | | | | We were using brw->gen, brw->is_haswell, and devinfo->gen in a few places, when we could just use GEN_GEN and GEN_IS_HASWELL, which are evaluated at compile time. Reviewed-by: Eduardo Lima Mitev <[email protected]>
* i965: Do not store SRC after 0 on component control.Rafael Antognolli2017-08-251-2/+2
| | | | | | | | | | | | | | | | | | The PRM SKL-Vol 2b-05.16 says: "Within a VERTEX_ELEMENT_STATE structure, if a Component Control field is set to something other than VFCOMP_STORE_SRC, no higher-numbered Component Control fields may be set to VFCOMP_STORE_SRC. In other words, only trailing components can be set to something other than VFCOMP_STORE_SRC." Since we set the component 1 to VFCOMP_STORE_0 on gen8+, and VFCOMP_STORE_IID on gen5+, and we are not using components 2 and 3, let's also set them to VFCOMP_STORE_0. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa: Implement GL_ARB_polygon_offset_clampAdam Jackson2017-08-2512-16/+24
| | | | | | | | | | | Semantically identical to the EXT version (whose string is still valid for GLES), so rename the bit but expose both extension strings. (Suggested by Ilia Mirkin and Ian Romanick.) v3: Fix the entrypoint alias in GL4x.xml (Ilia) Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: Implement GL_ARB_texture_filter_anisotropicAdam Jackson2017-08-2512-6/+20
| | | | | | | | | | | The only difference from the EXT version is bumping the minmax to 16, so just hit all the drivers at once. v2: Fix driver names, add to 17.3 release notes (Ilia Mirkin) Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium/u_threaded: fix a typoMarek Olšák2017-08-251-1/+1
|
* khronos/egl: remove dependency on Android NDK headerEric Engestrom2017-08-251-2/+1
| | | | | | | Khronos: https://github.com/KhronosGroup/EGL-Registry/pull/22 Suggested-by: Emil Velikov <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
* Revert "egl/android: add missing include"Eric Engestrom2017-08-251-1/+0
| | | | | | | | | | | | | | This reverts commit 688d866eca8943f09cd846ffb045e18f6ec0677c. The include I added in 688d866eca isn't actually useful, as it only declares the opaque struct ANativeWindow. However, this caused build issues for android-x86 [1] due to the header being moved in Android O. [1] https://lists.freedesktop.org/archives/mesa-dev/2017-August/167626.html Fixes: 688d866eca8943f09cd8 "egl/android: add missing include" Signed-off-by: Eric Engestrom <[email protected]>
* mesa: add KHR_no_error support to glBindBufferOffsetEXT()Samuel Pitoiset2017-08-253-1/+15
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add bind_buffer_offset() helperSamuel Pitoiset2017-08-251-13/+23
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glTransformFeedbackVaryings()Samuel Pitoiset2017-08-253-1/+17
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add transform_feedback_varyings() helperSamuel Pitoiset2017-08-251-26/+37
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glResumeTransformFeedback()Samuel Pitoiset2017-08-253-1/+12
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add resume_transform_feedback() helperSamuel Pitoiset2017-08-251-7/+15
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glPauseTransformFeedback()Samuel Pitoiset2017-08-253-1/+12
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add pause_transform_feedback() helperSamuel Pitoiset2017-08-251-7/+15
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glEndTransformFeedback()Samuel Pitoiset2017-08-253-1/+12
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add end_transform_feedback() helperSamuel Pitoiset2017-08-251-9/+17
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glBeginTransformFeedback()Samuel Pitoiset2017-08-253-1/+12
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add begin_transform_feedback() helperSamuel Pitoiset2017-08-251-20/+35
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glBindTransformFeedback()Samuel Pitoiset2017-08-253-1/+12
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add bind_transform_feedback() helperSamuel Pitoiset2017-08-251-10/+18
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: port the LastLookedUpVAO optimisation to _mesa_lookup_vao()Samuel Pitoiset2017-08-251-4/+16
| | | | | | | It was only used in the errors path. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: don't error check the default buffer object in glBindBufferOffsetEXT()Samuel Pitoiset2017-08-251-6/+5
| | | | | | | | An allocation check is already done when the buffer is created at context creation. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add _fallback suffix to the default transform feedback functionsSamuel Pitoiset2017-08-251-17/+17
| | | | | | | In preparation for KHR_no_error support. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: remove unnecessary check in _mesa_init_transform_feedback_object()Samuel Pitoiset2017-08-251-3/+0
| | | | | | | | All callers already check that, and the common behaviour is to check in the _mesa_new_XXX() helpers anyway. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: check allocation failures in new_transform_feedback()Samuel Pitoiset2017-08-251-0/+4
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: remove unused _mesa_validate_transform_feedback_buffers()Samuel Pitoiset2017-08-252-19/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* egl/wayland: Use roundtrips when awaiting buffer releaseKai Chen2017-08-251-2/+7
| | | | | | | | | | | | | | | | | | In get_back_bo, we use wl_display_dispatch_queue() to block and wait for a buffer release event. However, not all Wayland compositors flush the client socket on posting a buffer-release event, so by only blocking client-side, we may block indefinitely, or at least need to wait for an input event / frame completion to arrive for the compositor to flush. We now use dispatch_queue as a first pass, but if our entire buffer pool is exhausted, use a roundtrip (an immediately-triggered wl_callback) to ensure that the compositor flushes out our release event immediately. [daniels: Modified comment and commit message.] Signed-off-by: Kai Chen <[email protected]> Reviewed-by: Daniel Stone <[email protected]> CC: <[email protected]>
* glsl: fix glsl_struct_field size calculations for shader cacheNicolai Hähnle2017-08-251-7/+4
| | | | | | | | | | | | | | | | | | Found by address sanitizer: ==22621==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61400000cbd8 at pc 0x7f561610a4ff bp 0x7ffca85f9d50 sp 0x7ffca85f94f8 READ of size 344 at 0x61400000cbd8 thread T0 #0 0x7f561610a4fe (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x5f4fe) #1 0x7f560bb305a5 in memcpy /usr/include/x86_64-linux-gnu/bits/string3.h:53 #2 0x7f560bb305a5 in blob_write_bytes ../../../mesa-src/src/compiler/glsl/blob.c:136 #3 0x7f560be7d7ff in encode_type_to_blob ../../../mesa-src/src/compiler/glsl/shader_cache.cpp:153 #4 0x7f560be81222 in write_program_resource_data ../../../mesa-src/src/compiler/glsl/shader_cache.cpp:950 #5 0x7f560be81222 in write_program_resource_list ../../../mesa-src/src/compiler/glsl/shader_cache.cpp:1118 #6 0x7f560be81222 in shader_cache_write_program_metadata(gl_context*, gl_shader_program*) ../../../mesa-src/src/compiler/glsl/shader_cache.cpp:1407 #7 0x7f560b825fdb in link_program ../../../mesa-src/src/mesa/main/shaderapi.c:1163 Fixes: 073a84ff60db ("glsl: stop adding pointers from glsl_struct_field to the cache") Reviewed-by: Timothy Arceri <[email protected]>
* a2xx: fix DST_ALPHA blending for non-alpha formatsIlia Mirkin2017-08-253-5/+21
| | | | | | | | If we're rendering to a format without alpha, convert DST_ALPHA blend to a ONE so that factors are properly computed. This same workaround is done on a3xx+ as well. Signed-off-by: Ilia Mirkin <[email protected]>
* a2xx: set constant blend colorIlia Mirkin2017-08-251-0/+9
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* radeonsi: set IF_THRESHOLD to 4Timothy Arceri2017-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 74e39de9324d it was set to 3 and it was reported that 4 caused tesseract to start spilling VGPRs. This no longer seems to be the case. Totals: SGPRS: 2787844 -> 2787764 (-0.00 %) VGPRS: 1713121 -> 1712717 (-0.02 %) Spilled SGPRs: 7532 -> 7532 (0.00 %) Spilled VGPRs: 49 -> 33 (-32.65 %) Private memory VGPRs: 2060 -> 2060 (0.00 %) Scratch size: 2200 -> 2180 (-0.91 %) dwords per thread Code Size: 79265520 -> 79248360 (-0.02 %) bytes LDS: 436 -> 436 (0.00 %) blocks Max Waves: 670535 -> 670608 (0.01 %) Wait states: 0 -> 0 (0.00 %) Before: VGPR SPILLING APPS Shaders SpillVGPR PrivVGPR ScratchSize EffectsCaveDemo 301 0 256 264 ReflectionsSubwayDemo 264 0 256 264 VehicleGame 295 0 128 132 bioshock-infinite 1140 0 448 516 dirt-showdown 453 33 0 28 gang-beasts 364 0 500 496 kerbal-space-program 1228 0 472 480 tomb-raider-ultra 1199 16 0 20 After: VGPR SPILLING APPS Shaders SpillVGPR PrivVGPR ScratchSize EffectsCaveDemo 301 0 256 264 ReflectionsSubwayDemo 264 0 256 264 VehicleGame 295 0 128 132 bioshock-infinite 1140 0 448 516 dirt-showdown 453 33 0 28 gang-beasts 364 0 500 496 kerbal-space-program 1228 0 472 480 The only change in VGPR spills is the elimination of all spills in Tomb Raider at Ultra settings. Closer examination shows that the shaders go over the limit because they contain three expressions a mul, rcp and ubo load. The ubo load is actually used elsewhere and is therefore stored in a temp already in IR such as tgsi but glsl ir counts it agaist the if cost. Acked-by: Nicolai Hähnle <[email protected]> Acked-by: Marek Olšák <[email protected]>
* util/disk_cache: write cache item metadata to diskTimothy Arceri2017-08-251-1/+87
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: pass shader source keys to the disk cacheTimothy Arceri2017-08-256-16/+34
| | | | | | | We don't actually write them to disk here. That will happen in the following commit. Reviewed-by: Nicolai Hähnle <[email protected]>
* util/disk_cache: add struct cache_item_metadataTimothy Arceri2017-08-251-0/+20
| | | | | | | | | This will be used to store more information about the cache item in it's header. This information is intended for 3rd party and cache analysis use but can also be used for detecting the unlikely scenario of cache collisions. Reviewed-by: Nicolai Hähnle <[email protected]>
* disk_cache: enable limited hash collision detection in release buildsTimothy Arceri2017-08-251-16/+10
| | | | | | | It really doesn't cost us much and will stop strange crashes should the stars align. Reviewed-by: Nicolai Hähnle <[email protected]>
* util/disk_cache: rename mesa cache dir and introduce cache versioningTimothy Arceri2017-08-253-14/+42
| | | | | | | | | | | | | | | | | | Steam is already analysing cache items, unfortunatly we did not introduce a versioning mechanism for identifying structural changes to cache entries earlier so the only way to do so is to rename the cache directory. Since we are renaming it we take the opportunity to give the directory a more meaningful name. Adding a version field to the header of cache entries will help us to avoid having to rename the directory in future. Please note this is versioning for the internal structure of the entries as defined in disk_cache.{c,h} as opposed to the structure of the data provided to the disk cache by the GLSL compiler and the various driver backends. Reviewed-by: Nicolai Hähnle <[email protected]>
* radv: don't crash if we have no framebufferDave Airlie2017-08-251-0/+4
| | | | | | | | | | | | Recording secondaries with no framebuffer attachment may make this happen, though this might not be the complete solution. (esp if someone does meta stuff in there, would we have to save things, not sure). Fixes: f4e499ec791 ("radv: add initial non-conformant radv vulkan driver") Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>