summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* eglmesaext: add new enums for EGL_MESA_drm_image_formatsNicolai Hähnle2017-02-061-0/+7
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* docs: add EGL_MESA_drm_image_formats extension proposalNicolai Hähnle2017-02-062-0/+103
|
* dri/common: clear the loaderPrivate pointer in driDestroyDrawableNicolai Hähnle2017-02-061-0/+12
| | | | | | | | | | | | | | | | | | | | The GLX specification says about glXDestroyPixmap: "The storage for the GLX pixmap will be freed when it is not current to any client." We're not really following this language to the letter: some of the storage is freed immediately (in particular, the dri3_drawable, which contains both GLXDRIdrawable and loader_dri3_drawable). So we NULL out the pointers to that freed storage; the previous patches added the corresponding NULL-pointer checks. This fixes memory corruption in piglit ./bin/glx-visuals-depth/stencil -pixmap -auto Cc: 17.0 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glx: guard swap-interval functions against destroyed drawablesNicolai Hähnle2017-02-062-3/+19
| | | | | | | | | | | | | | | | The GLX specification says about glXDestroyPixmap: "The storage for the GLX pixmap will be freed when it is not current to any client." So arguably, functions like glXSwapIntervalMESA can be called after glXDestroyPixmap has been called for the currently bound GLXPixmap. In that case, the GLXDRIDrawable no longer exists, and so we just skip those calls. Cc: 17.0 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glx/dri3: guard in_current_context against a disappeared drawableNicolai Hähnle2017-02-061-0/+4
| | | | | | Cc: 17.0 <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glx/dri3: handle NULL pointers in loader-to-DRI3 drawable conversionNicolai Hähnle2017-02-061-0/+2
| | | | | | | | | | | | | With a subsequent patch, we might see NULL loaderPrivates, e.g. when a DRIdrawable is flushed whose corresponding GLXDRIdrawable was destroyed. This resulted in a crash, since the loader vs. DRI3 drawable structures have a non-zero offset. Fixes glx-visuals-{depth,stencil} -pixmap Cc: 17.0 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* anv/pipeline: set ThreadDispatchEnable conditionallyJuan A. Suarez Romero2017-02-061-23/+26
| | | | | | | | Set 3DSTATE_WM/ThreadDispatchEnable bit on/off based on the same conditions as used in the GL version. Signed-off-by: Juan A. Suarez Romero <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* main/fboject: default_framebuffer allowed for GetFramebufferParameterAlejandro Piñeiro2017-02-061-7/+37
| | | | | | | | | | | | | | | | | | | | Before 4.5, the default framebuffer was not allowed for GetFramebufferParameter, so it should return INVALID_OPERATION for any call using the default framebuffer. 4.5 included new pnames, and some of them are allowed for the default framebuffer. For the rest, INVALID_OPERATION. From OpenGL 4.5 spec, section 9.2.3 "Framebuffer Object Queries: "An INVALID_OPERATION error is generated by GetFramebufferParameteriv if the default framebuffer is bound to target and pname is not one of the accepted values from table 23.73, other than SAMPLE_POSITION." Fixes: GL45-CTS.direct_state_access.framebuffers_get_parameter_errors Reviewed-by: Anuj Phogat <[email protected]>
* main/fbobject: implement new 4.5 pnames for GetFramebufferParameterAlejandro Piñeiro2017-02-061-0/+18
| | | | | | | | | | | | | | | | | | | | | | 4.5 added new pnames allowed for GetFramebufferParameter, and GetNamedFramebufferParameter. From OpenGL 4.5 spec, section 9.2.3 "Framebuffer Object Queries" (quoting the paragraph with only the new pnames, not all the supported): "pname may also be one of DOUBLEBUFFER, IMPLEMENTATION_COLOR_READ_FORMAT, IMPLEMENTATION_COLOR_READ_TYPE, SAMPLES, SAMPLE_BUFFERS, or STEREO, indicating the corresponding framebuffer-dependent state from table 23.73. Values of framebuffer-dependent state are identical to those that would be obtained were the framebuffer object bound and queried using the simple state queries in that table. These values may be queried from either a framebuffer object or a default framebuffer." Fixes: GL45-CTS.direct_state_access.framebuffers_get_parameters Reviewed-by: Anuj Phogat <[email protected]>
* main/framebuffer: refactor _mesa_get_color_read_format/typeAlejandro Piñeiro2017-02-064-22/+71
| | | | | | | | | | | | | | | | | | Current implementation returns the value for the currently bound read framebuffer. GetNamedFramebufferParameteriv allows to get it for any given framebuffer. GetFramebufferParameteriv would be also interested on that method It was refactored by allowing to pass a given framebuffer. If NULL is passed, it used the currently bound framebuffer. It also adds a call to _mesa_update_state. When used only by GetIntegerv, this one was called as part of the extra checks defined at get_hash. But now that the method is used by more methods, and the update is needed, it makes sense (and it is safer) just calling it on the method itself, instead of rely on the caller. Reviewed-by: Anuj Phogat <[email protected]>
* radv: fix shared memory load/stores.Dave Airlie2017-02-031-0/+7
| | | | | | | | | | | If we have an indirect index here we need to scale it by attribute slots e.g. is this is vec2[256] then we get an indir_index in the 0.255 range but the vec2 are aligned inside vec4 slots. So scale the indir index, then extract the channels. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: correctly size shared memory usage.Dave Airlie2017-02-031-1/+1
| | | | | | | | | | We count the number of slots used, but slots are vec4 sized, so we have to scale by 16 not 4. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix compute shared memory stores since 64-bit.Dave Airlie2017-02-031-1/+3
| | | | | | | | | | | These regressed and caused doom to stop loading. Fixes: 03724af26 radv/ac: Implement Float64 load/store var. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* docs: replace URL in features.txtBrian Paul2017-02-031-2/+3
| | | | | | | | Replace unmaintained http://dri.freedesktop.org/wiki/MissingFunctionality URL with http://mesamatrix.net/ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95460 Acked-by: Kenneth Graunke <[email protected]>
* mesa: whitespace fixes in context.cBrian Paul2017-02-031-31/+31
| | | | Remove trailing whitespace, replace tabs with spaces. Trivial.
* anv/blorp: Disable resolves for transparent black clearsNanley Chery2017-02-031-2/+8
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Don't temporarily enable CCS_E within a render passNanley Chery2017-02-031-2/+13
| | | | | | | | | | | | | | | | Compressing a render target and decompressing it in the same single-subpass render pass may waste bandwidth. While this may be beneficial in some circumstances, it does not help in all. Reclaims about 1.95% FPS for Dota 2 on some configurations. v2 (Jason Ekstrand): - Provide a more thorough comment - Enable CCS_D for input attachments v3 (Jason Ekstrand): - Provide performance numbers Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Don't crash when destroying contexts created with no visual.Kenneth Graunke2017-02-031-1/+1
| | | | | | | | | | | | | | | dEQP-EGL.functional.create_context.no_config tries to create a context with no config, then immediately destroys it. The drawbuffer is never set up, so we can't dereference it asking if it's double buffered, or we'll crash on a null pointer dereference. Just bail early. Applications using EGL_KHR_no_config_context could hit this. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* winsys/amdgpu: avoid potential segfault in amdgpu_bo_map()Samuel Pitoiset2017-02-031-7/+10
| | | | | | | | | | cs can be NULL when it comes from r600_buffer_map_sync_with_rings() to avoid doing the same checks. It was checked for write mappings but not for read mappings. Cc: "17.0" <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* android: fix droid_create_image_from_prime_fd_yuv for YV12Tapani Pälli2017-02-031-1/+1
| | | | | | | | | | | | | | | | Earlier changes introduced is_ycrcb flag which checks the component order of u and v components. Condition for setting the flag was incorrect, with ycrcb we are supposed to have cr before cb. This patch (together with a fix in our gralloc) fixes corrupted rendering from 'test-opengl-gl2_yuvtex' native test and corrupted gallery thumbnail in application switcher on Android-IA. Fixes: 51727b1cf57e8c4630767eb9ead207b102ffa489 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Plamena Manolova <[email protected]> Reviewed-by: Marta Lofstedt <[email protected]> Reviewed-by: Tomasz Figa <[email protected]>
* ilo: EOL unmaintained older gallium intel driverEdward O'Callaghan2017-02-03120-58007/+0
| | | | | | | | This is no longer actively maintained and is just accumulating bitrot. Signed-off-by: Edward O'Callaghan <[email protected]> Acked-by: Chia-I Wu <[email protected]>
* ilo: EOL drop unmaintained gallium drv from buildsysEdward O'Callaghan2017-02-0311-50/+6
| | | | | | | | This is no longer actively maintained and is just accumulating bitrot. Signed-off-by: Edward O'Callaghan <[email protected]> Acked-by: Chia-I Wu <[email protected]>
* ilo: EOL unplumb unmaintained gallium drv from winsysEdward O'Callaghan2017-02-035-85/+0
| | | | | | | | This is no longer actively maintained and is just accumulating bitrot. Signed-off-by: Edward O'Callaghan <[email protected]> Acked-by: Chia-I Wu <[email protected]>
* configure: libdrm is a single packageIlia Mirkin2017-02-021-16/+16
| | | | | | | | | | | | The intent of the libdrm_$driver version limits has always been to not burden the "other" drivers with updating their libdrm unless really necessary. Unfortunately the configure script erroneously only checked the driver-specific bit and not the generic bit of libdrm as well. Fix this. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: MAX_VARYING is the max supported number of patch varyings, not minIlia Mirkin2017-02-021-1/+1
| | | | | | | | | | | This fixes GL45-CTS.tessellation_shader.tessellation_shader_tessellation.max_in_out_attributes on nouveau. We only support 30 patch varyings (as 2 vec4 slots end up being used for tess level settings), but were getting 32 exposed. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: "13.0 17.0" <[email protected]>
* vbo: process buffer binding state changes on draw when recordingIlia Mirkin2017-02-021-0/+7
| | | | | | | | | | | | | | The VBO module keeps track of any vbo buffers. It updates this list when receiving an InvalidateState call, however this never happens when recording draws right now. Make sure that we do all the usual state updates when recording draws so that the VBO list may be kept up to date. Signed-off-by: Ilia Mirkin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99631 Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]> Cc: "13.0 17.0" <[email protected]>
* radv/ac: move to using shared emit_ddxy code.Dave Airlie2017-02-031-68/+7
| | | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi/ac: move most of emit_ddxy to shared code.Dave Airlie2017-02-033-71/+93
| | | | | | | | We can reuse this in radv. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: use shared thread id codeDave Airlie2017-02-031-42/+2
| | | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi/ac: move get thread id to shared code.Dave Airlie2017-02-033-56/+55
| | | | | | | | radv will use this. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: migrate to using shared code for some load/store stuff.Dave Airlie2017-02-031-103/+28
| | | | | | | | This migrates to the code shared with radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi/ac: move tbuffer store and buffer load to shared code.Dave Airlie2017-02-033-186/+238
| | | | | | | | These are all reuseable by radv. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi/ac: move a bunch of load/store related things to common code.Dave Airlie2017-02-034-94/+114
| | | | | | | | | These are all shareable with radv, so start migrating them to the common code. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* texgetimage: Add check for the effective target to GetTextureSubImageEduardo Lima Mitev2017-02-031-0/+6
| | | | | | | | | | | | | | | | | | | OpenGL 4.5 spec, section "8.11.4 Texture Image Queries", page 233 of the PDF states: "An INVALID_OPERATION error is generated if texture is the name of a buffer or multisample texture." This is currently not being checked and e.g a multisample texture image can be passed down to the driver hook. On i965, it is crashing the driver with an assertion: intel_mipmap_tree.c:3125: intel_miptree_map: Assertion `mt->num_samples <= 1' failed. v2: (Ilia Mirkin) Move the check from gettextimage_error_check() to GetTextureSubImage() and use the texObj target. Reviewed-by: Ilia Mirkin <[email protected]>
* Revert "radeonsi: decrease the number of texture slots to 24"Marek Olšák2017-02-031-1/+1
| | | | | | | | | | This reverts commit bdd860e3076655519d45bd66936ef7be9b7dda63. Requested by a game developer. Cc: 17.0 <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* configure.ac: explicitly require libdrm for dri classic drivers.Dave Airlie2017-02-031-0/+5
| | | | | | | Although this might come from somewhere else require it explicitly. Reviewed-by: Chad Versace <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* intel/isl: Add a better comment for format_supports_ccs_eJason Ekstrand2017-02-021-0/+6
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* anv: Remove the finishme for CCS_E with storage imagesJason Ekstrand2017-02-021-14/+7
| | | | | | | | | The data port can't handle CCS at all so replace the finishme with better comments. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* intel/isl: Assert that we don't use CCS for storage imagesJason Ekstrand2017-02-021-0/+6
| | | | | | | | | | I enabled CCS for storage images in the Vulkan driver and ran it through the CTS. It didn't result in any hangs but it demonstrated that the data port cannot handle CCS. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* intel/isl: Add a formats_are_ccs_e_compatible helperJason Ekstrand2017-02-023-0/+41
| | | | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* intel/isl: Add a format_supports_ccs_d helperJason Ekstrand2017-02-022-0/+24
| | | | | | | | | Nothing uses this yet but it serves as a nice bit of documentation that's relatively easy to find. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* intel/isl: Rename supports_lossless_compression to supports_ccs_eJason Ekstrand2017-02-027-15/+11
| | | | | | | | | | | | | The term "lossless compression" could potentially mean multisample color compression, single-sample color compression or HiZ because they are all lossless. The term CCS_E, however, has a very precise meaning; in ISL and is only used to refer to single-sample color compression. It's also much shorter which is nice. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* anv/pass: Store the depth-stencil attachment's last subpass indexNanley Chery2017-02-021-0/+1
| | | | | | | | | | | Commit 968ffd6c868af7226e8f889573eef709888151cb stored the last subpass index of all the attachments but that of the depth-stencil attachment. This could cause depth buffers used in multiple subpasses not to be in the requested final layout. Fix this error. Cc: "17.0" <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Nanley Chery <[email protected]>
* gallium: turn PIPE_SHADER_CAP_DOUBLES into a screen capabilityNicolai Hähnle2017-02-0219-33/+30
| | | | | | | | | | | | | | | | | | | Make the cap consistent with PIPE_CAP_INT64. Aside from the hypothetical case of using draw for vertex shaders (and actually caring about doubles...), every implementation supports doubles either nowhere or everywhere. Also, st/mesa didn't even check the cap correctly in all supported shader stages. While at it, add a missing LLVM version check for 64-bit integers in radeonsi. This is conservative: judging by the log, LLVM 3.8 might be sufficient, but there are probably bugs that have been fixed since then. v2: fix clover (Marek) Reviewed-by: Marek Olšák <[email protected]>
* mesa: Enable EXT_compressed_ETC1_RGB8_sub_texturePlamena Manolova2017-02-022-1/+1
| | | | | | | | | | | | | | | | Since we already have the functionality in place and games like Game of Thrones seem to depend on this extension, I think it makes sense to enable it by making it part of the extension string even though it's still a draft: https://www.khronos.org/registry/gles/extensions/EXT/EXT_compressed_ETC1_RGB8_sub_texture.txt Note: OES_compressed_ETC1_RGB8_sub_texture seems to be listed in gl2ext.h, but there's no documentation for it in the KHR registry Signed-off-by: Plamena Manolova <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* configure: Only require libdrm 2.4.75 for intel.Vinson Lee2017-02-021-2/+2
| | | | | | Fixes: b8acb6b17981 ("configure: Require libdrm >= 2.4.75") Signed-off-by: Vinson Lee <[email protected]> Acked-by: Dave Airlie <[email protected]>
* anv: enable VK_KHR_shader_draw_parametersLionel Landwerlin2017-02-022-0/+5
| | | | | | | | | | Enables 10 tests from: dEQP-VK.draw.shader_draw_parameters.* Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: emit DrawID if neededLionel Landwerlin2017-02-023-7/+63
| | | | | | | | v2: use define for buffer ID (Jason) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: always allocate a vertex element with vertexid or instanceidLionel Landwerlin2017-02-021-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Up to now on Gen8+ we only allocated a vertex element for gl_InstanceIndex or gl_VertexIndex when a vertex shader uses gl_BaseInstanceARB or gl_BaseVertexARB. This is because we would configure the VF_SGVS packet to make the VF unit write the gl_InstanceIndex & gl_VertexIndex values right behind the values computed from the vertex buffers. In the next commit we will also write the gl_DrawIDARB value. Our backend expects to pull the gl_DrawIDARB value from the element following the element containing gl_InstanceIndex, gl_VertexIndex, gl_BaseInstanceARB and gl_BaseVertexARB (see vec4_vs_visitor::setup_attributes). Therefore we need to allocate an element for the SGVS elements as long as at least one of the SGVS element is read by the shader. Otherwise our shader will use a gl_DrawIDARB value pulled from the URB one element too far (most likely garbage). v2: Fix my english (Lionel) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: move BaseVertexID/BaseInstanceID vertex buffer index to 31Lionel Landwerlin2017-02-023-2/+4
| | | | | | | | v2: use define for buffer ID (Jason) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>