aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gallium: split depth_clip into depth_clip_near & depth_clip_farMarek Olšák2018-09-0651-58/+100
| | | | for AMD_depth_clamp_separate.
* anv/pipeline: Only consider double elements which actually existJason Ekstrand2018-09-061-1/+2
| | | | | | | | | | | | The brw_vs_prog_data::double_inputs_read field comes directly from shader_info::double_inputs which may contain inputs which are not actually read. Instead of using it directly, AND it with inputs_read which is only things which are read. Otherwise, we may end up subtracting too many elements when computing elem_count. Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103241 Reviewed-by: Lionel Landwerlin <[email protected]>
* nir: Drop the vs_inputs_dual_locations optionJason Ekstrand2018-09-068-58/+23
| | | | | | | | | | | | | It was very inconsistently handled; the only things that made use of it were glsl_to_nir, glspirv, and nir_gather_info. In particular, nir_lower_io completely ignored it so anyone using nir_lower_io on 64-bit vertex attributes was going to be in for a shock. Also, as of the previous commit, it's set by every driver that supports 64-bit vertex attributes. There's no longer any reason to have it be an option so let's just delete it. Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* radeonsi/nir: Set vs_inputs_dual_locations and let NIR do the remapJason Ekstrand2018-09-063-29/+22
| | | | | | | | | | | | | | | | | We were going out of our way to disable dual-location re-mapping in NIR only to then do the remapping in st_glsl_to_nir.cpp. Presumably, this was so that double_inputs would be correct for the core state tracker. However, now that we've it to gl_program::DualSlotInputs which is unaffected by NIR lowering, we can let NIR lower things for us. The one tricky bit here is that we have to remap the inputs_read bitfield back to the single-slot convention for the gallium state tracker to use. Since radeonsi is the only NIR-capable gallium driver that also supports GL_ARB_vertex_attrib_64bit, we only have to worry about radeonsi when making core gallium state tracker changes. Acked-by: Marek Olšák <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* compiler: Move double_inputs to gl_program::DualSlotInputsJason Ekstrand2018-09-0614-65/+83
| | | | | | | | | | | | | | | | | | | | | | | Previously, we had two field in shader_info: double_inputs_read and double_inputs. Presumably, the one was for all double inputs that are read and the other is all that exist. However, because nir_gather_info regenerates these two values, there is a possibility, if a variable gets deleted, that the value of double_inputs could change over time. This is a problem because double_inputs is used to remap the input locations to a two-slot-per-dvec3/4 scheme for i965. If that mapping were to change between glsl_to_nir and back-end state setup, we would fall over when trying to map the NIR outputs back onto the GL location space. This commit changes the way slot re-mapping works. Instead of the double_inputs field in shader_info, it adds a DualSlotInputs bitfield to gl_program. By having it in gl_program, we more easily guarantee that NIR passes won't touch it after it's been set. It also makes more sense to put it in a GL data structure since it's really a mapping from GL slots to back-end and/or NIR slots and not really a NIR shader thing. Tested-by: Alejandro Piñeiro <[email protected]> (ARB_gl_spirv tests) Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* gallium: add PIPE_CAP_RASTERIZER_SUBPIXEL_BITSMarek Olšák2018-09-066-0/+9
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* meson: disable asserts by default on release buildsEric Engestrom2018-09-062-5/+4
| | | | | | | | | | | | | | | | | | | | | | By the time Mesa 18.3 comes out (probably December '18), Meson 0.45 will be 9 months old (March '18), so I think this is reasonable. (btw, the currently-required Meson 0.44.1 was released less than 12 days before 0.45, so we're really not bumping by much.) Currently, the Meson versions in the major distributions are: Arch: ships 0.47.2 CentOS: 7 ships 0.47.1 Debian: stable ships 0.37.1, so it hasn't been usable in a long time. everything more recent ships 0.47.2 Fedora: 28 ships 0.45.1 FreeBSD: ships 0.46.1 (ports) Gentoo: ships 0.46.1 OpenSUSE: 15 ships 0.46 Ubuntu: 18.04 ships 0.45.1 Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* mesa/util: add missing va_end() after va_copy()Andrii Simiklit2018-09-061-0/+1
| | | | | | | | | | | MSDN: "va_end must be called on each argument list that's initialized with va_start or va_copy before the function returns." Reviewed-by: Eric Engestrom <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107810 Fixes: c6267ebd6c8a "gallium/util: Stop bundling our snprintf implementation." Signed-off-by: Andrii Simiklit <[email protected]>
* mesa/util: don't ignore NULL returned from 'malloc'Andrii Simiklit2018-09-061-1/+1
| | | | | | | | | | We should exit from the function 'util_vasprintf' with error code -1 for case where 'malloc' returns NULL Reviewed-by: Eric Engestrom <[email protected]> Fixes: 864148d69e1e "util: add util_vasprintf() for Windows (v2)" Signed-off-by: Andrii Simiklit <[email protected]>
* mesa/util: don't use the same 'va_list' instance twiceAndrii Simiklit2018-09-061-1/+1
| | | | | | | | The first usage of the 'va_list' instance could change it. Reviewed-by: Eric Engestrom <[email protected]> Fixes: 864148d69e1e "util: add util_vasprintf() for Windows (v2)" Signed-off-by: Andrii Simiklit <[email protected]>
* apple/glx/log: added missing va_end() after va_copy()Andrii Simiklit2018-09-061-0/+1
| | | | | | | | | Each invocation of va_copy() must be matched by a corresponding invocation of va_end() Reviewed-by: Eric Engestrom <[email protected]> Fixes: 51691f0767f6 "darwin: Use ASL for logging" Signed-off-by: Andrii Simiklit <[email protected]>
* meson: drop unnecessary llvm version hacksEric Engestrom2018-09-061-9/+0
| | | | | | | | | The current minimum meson version supported is 0.44.1, so we have met both the 0.43 and 0.44 requirement to not need these hacks anymore :) Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* mesa: add missing return statement for GL_RG_SNORM caseDanylo Piliaiev2018-09-061-1/+1
| | | | | | | Fixes: 0d356cf4781bece0dc9a7 "mesa: enable EXT_render_snorm extension" Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* meson: consolidate langs listsEric Engestrom2018-09-061-3/+9
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* intel/compiler: remove unused get_image_base_type()Eric Engestrom2018-09-061-19/+0
| | | | | | | | | Unused since 09f1de97a76a4990fd7c "anv,i965: Lower away image derefs in the driver". Cc: Jason Ekstrand <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* tnl: Fix green gun regression in xonotic.Mathias Fröhlich2018-09-061-1/+1
| | | | | | | | | | | | | Fix an other regression of mesa: Make gl_vertex_array contain pointers to first order VAO members. The regression showed up with drivers using the tnl module and was reproducible using xonotic-glx -benchmark demos/the-big-keybench.dem. Fixes: 64d2a204805 mesa: Make gl_vertex_array contain pointers to first order VAO members. Tested-by: Ville Syrjälä <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* Revert "i965/tools: 32bit compilation with meson"Lionel Landwerlin2018-09-061-1/+1
| | | | | | This reverts commit 4aec44c0d9c4c0649c362199fac97efe0a3b38a4. Unfortunately this patch needed a another one to be committed first.
* i965/tools: 32bit compilation with mesonSergii Romantsov2018-09-061-1/+1
| | | | | | | | | | | Building of 32bit mesa with meson causes issue: "implicit declaration of function ‘__builtin_ia32_clflush’". Fixed by adding msse2 compilation flag. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107843 Fixes: 314879f7fec0 (i965: Fix asynchronous mappings on !LLC platforms.) Signed-off-by: Sergii Romantsov <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* glsl: fixer lexer for unreachable definesTimothy Arceri2018-09-062-23/+38
| | | | | | | | | | | | | | | | | | | | | | | | If we have something like: #ifdef NOT_DEFINED #define A_MACRO(x) \ if (x) #endif The # on the #define is not skipped but the define itself is so this then gets recognised as #if. Until 28a3731e3f this didn't happen because we ended up in <HASH>{NONSPACE} where BEGIN INITIAL was called stopping the problem from happening. This change makes sure we never call RETURN_TOKEN_NEVER_SKIP for if/else/endif when processing a define. Cc: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107772 Tested-By: Eero Tamminen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* freedreno/ir3: insert mov if same instruction in the outputs.Hyunjun Ko2018-09-051-0/+14
| | | | | | | | | | | | | | | | For example, result0 = texture(sampler[indexBase + 5], coords); result1 = texture(sampler[indexBase + 0], coords); result2 = texture(sampler[indexBase + 0], coords); out_result0 = result0; out_result1 = result1; out_result2 = result2; In this kind of case we need to insert an extra mov to the outputs so that the result could be assigned to each register respectively. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: make immediates array dynamicHyunjun Ko2018-09-053-1/+11
| | | | | | | | | | Since most shaders wouldn't need that large array of immediates, making the array dynamic could save unnecessary spaces. In addition, sometimes we can potentially have a much larger array of immediates to be lowered, which might be more than 64. Signed-off-by: Rob Clark <[email protected]>
* freedreno: allocate ctx's batch on demandRob Clark2018-09-054-15/+25
| | | | | | | Don't fall over when app wants more than 32 contexts. Instead allocate contexts on demand. Signed-off-by: Rob Clark <[email protected]>
* freedreno: add fd_context_batch() accessorRob Clark2018-09-058-10/+21
| | | | | | | For cases in which (after the following commit) ctx->batch may be null. Prep work for following commit. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a6xx: fix mem2gmem for zsbufRob Clark2018-09-051-1/+4
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/batch: fix crash in !reorder caseRob Clark2018-09-051-2/+8
| | | | | | We aren't using the batch-cache if reorder==false. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: better compile_error() printingRob Clark2018-09-051-2/+16
| | | | | | Try to show the error at the appropriate line of nir Signed-off-by: Rob Clark <[email protected]>
* freedreno/a6xx: bordercolor fixesRob Clark2018-09-051-4/+25
| | | | | | | | | Port fixes from a5xx (f0715442) TODO maybe this should move to shared code, since it seems to be the same. Signed-off-by: Rob Clark <[email protected]>
* freedreno: fix context teardown harderRob Clark2018-09-054-8/+8
| | | | | | | | The border_color_uploaders need to be torn down before the transfer_pool is destroyed. Fixes: e11e9d63943 freedreno: fix context teardown race Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: ignore unused inputsRob Clark2018-09-051-1/+29
| | | | | | | | | | We could end up w/ inputs larger than vec4, simply because unused inputs are not split. Fixes things like dEQP-GLES31.functional.separate_shader.random.77 (and probably a handful of others) Signed-off-by: Rob Clark <[email protected]>
* freedreno/a6xx: fix debug build crashRob Clark2018-09-051-0/+7
| | | | | | Porting 0c8d9e923aa9239e20f9bc969faf9caa0b85237f to a6xx. Signed-off-by: Rob Clark <[email protected]>
* meson: Print a message about why a libdrm version was selectedDylan Baker2018-09-051-0/+5
| | | | | | | | | | | | | | | | | We require a single version of libdrm for all of our libdrm dependencies (core and driver), but the way this is structured can make the error message less than helpful, as one driver might be the one setting the libdrm requirement, while another might be the one that generates the version failure. This adds a simple message to the output announcing which libdrm module set the version, which might be more helpful. v2: - Use message suggested by Eric Engstrom Fixes: c445b1d56f47922206de55e557444aadb62e11f6 ("meson: Use the same version for all libdrm checks") Reviewed-by: Eric Engestrom <[email protected]>
* svga: rename face to layer_faceCharmaine Lee2018-09-051-22/+25
| | | | | Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* svga: encode sample count in resource declarationsBrian Paul2018-09-054-0/+6
| | | | | | No regressions before the corresponding host-side change. Reviewed-by: Neha Bhende <[email protected]>
* svga: sync with upstream changes to surface flagsCharmaine Lee2018-09-059-14/+19
| | | | | | | | | SVGA device now supports 64 bits surface flags. This patch updates the winsys interface to allow 64 bits surface flags. The linux winsys layer will for now only honor the lower 32 bits of the surface flags. Reviewed-by: Brian Paul <[email protected]>
* svga: avoid try_blit() for some depth formats on non vgpu10.Neha Bhende2018-09-051-0/+13
| | | | | | | | | | | | | On non vgpu10, driver doesn't support util_blitter_blit for SVGA3D_Z_D16, SVGA3D_Z_D24x8, SVGA3D_Z_D24S8. Patch fixes following piglit tests regression on hwv8 caused by commit 27bf35caea5e: spec@arb_depth_texture@fbo-depth-gl-depth-component16-blit spec@arb_depth_texture@fbo-depth-gl-depth-component24-blit spec@arb_depth_texture@fbo-depth-gl-depth-component32-blit Tested with mtt-piglit on hw 8,9,10,11,13 and mtt-glretrace on windows and linux. Reviewed-by: Charmaine Lee <[email protected]>
* svga: convert dst format to linear when blending is enabled.Neha Bhende2018-09-051-1/+3
| | | | | | | | | | | When blending is enabled, framebuffer colorspace has to be linear. Previously, we never hit this case because we were not supporting sRGB drawable. Previous patch added that support. Tested with mtt glretrace, viewperf, piglit, conform. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* winsys/svga: Avoid cap2 code path for nowNeha Bhende2018-09-051-13/+5
| | | | | | | CAP2 functionality is not yet part of vmwgfx. This is causing unnecessary dmesg error messages. Reviewed-by: Charmaine Lee <[email protected]>
* svga: start using SVGA3dCmdIntraSurfaceCopy command for svga_blit.Neha Bhende2018-09-051-0/+112
| | | | | | | | | | | | | Basically, SVGA3dCmdIntraSurfaceCopy command allow copying when source and destination are same. Tested with MTT piglit, glretrace, viewperf, conform v2: changes as per Charmaine's comment v3: changes as per Charmaine's comment Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* svga/winsys: Add cap2 support in winsysNeha Bhende2018-09-054-2/+38
| | | | | Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* svga: Add SVGA3dCmdIntraSurfaceCopy command support in OpenGL driverNeha Bhende2018-09-053-0/+49
| | | | | | | v2: changes as per Charmaine's comment Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* svga: update device header files from upstreamBrian Paul2018-09-0515-196/+569
| | | | | | This is a squash commit of several earlier patches. Signed-off-by: Brian Paul <[email protected]>
* winsys/drm: Fix assert when try to accumulate an invalid fdCharmaine Lee2018-09-051-2/+7
| | | | | | | | | | This patch makes sure there is a valid fd before merging it to the context's fd in vmw_svga_winsys_fence_server_sync(). This fixes the assert running webot. No regression running kmscube. Reviewed-by: Sinclair Yeh <[email protected]>
* loader: Drop unused argument from dri3_update_drawable().Eric Anholt2018-09-051-4/+3
| | | | | | The argument has never been used since the function was added. Reviewed-by: Michel Dänzer <[email protected]>
* i965/fs: include multisamplers on image_intrinsic_coord_componentsAlejandro Piñeiro2018-09-051-0/+2
| | | | | | | | | | | | | | | | | | This is the second patch needed to fix the following piglit tests: tests/spec/arb_gl_spirv/linker/uniform/multisampler.shader_test tests/spec/arb_gl_spirv/linker/uniform/multisampler-array.shader_test Although in this case it doesn't affect so many borrowed tests, as there aren't too many tests using multisamplers on Intel. It is worth to note that this patch is also needed when those tests are run on GLSL mode (using the --glsl option). Although most Intel drivers would not be able to run/execute tests using multisamplers, as GL_MAX_IMAGE_SAMPLES is zero, technically those tests are expected to link correctly, so linking tests should pass. Reviewed-by: Jason Ekstrand <[email protected]>
* i965: move brw_nir_lower_gl_images callAlejandro Piñeiro2018-09-052-1/+10
| | | | | | | | | | | | | | | | | | | At this moment that lowering is using info coming from the UniformStorage, so for the ARB_gl_spirv codepath, it needs to be done after calling gl_nir_link_uniforms. As for the GLSL codepath it can also be called later, we just move the call on both cases, to avoid adding several shader->spirv_data checks, and keep the patch as small as possible. This is the first patch needed to fix the following piglit tests: tests/spec/arb_gl_spirv/linker/uniform/multisampler.shader_test tests/spec/arb_gl_spirv/linker/uniform/multisampler-array.shader_test but fixes thousands of tests when borrowing the tests from other specs (that needs to be done manually right now). Reviewed-by: Jason Ekstrand <[email protected]>
* intel/compiler: rename brw_nir_lower_glsl_imagesAlejandro Piñeiro2018-09-053-5/+5
| | | | | | | | | | To brw_nir_lower_gl_images, as it will be also used on the ARB_gl_spirv codepath, that doesn't involves GLSL at all. So the lowering is about images following the OpenGL semantics. In any case "brw_nir_lower_opengl_images" seemed too long to me, so I just used gl. That shortening is already used on other parts of the code. Reviewed-by: Jason Ekstrand <[email protected]>
* intel/compiler: remove unused variable num_imagesAlejandro Piñeiro2018-09-051-2/+0
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* winsys/virgl/vtest: Correct off-by-one error in resource allocationGert Wollny2018-09-051-4/+9
| | | | | | | The resource bo array must already extended when the target index is equal to the current size of the array. Signed-off-by: Gert Wollny <[email protected]>
* winsys/virgl: Initialize value to silence valgrindGert Wollny2018-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | Silences: Conditional jump or move depends on uninitialised value(s) at 0xB72F2C0: virgl_drm_winsys_create (virgl_drm_winsys.c:854) by 0xB72F2C0: virgl_drm_screen_create (virgl_drm_winsys.c:926) by 0xB21C885: pipe_virgl_create_screen (drm_helper.h:275) by 0xB7201F0: pipe_loader_create_screen (pipe_loader.c:137) by 0xB639C91: dri2_init_screen (dri2.c:2112) by 0xB634F68: driCreateNewScreen2 (dri_util.c:153) by 0x63023E6: dri3_create_screen (dri3_glx.c:893) by 0x62D35BD: AllocAndFetchScreenConfigs (glxext.c:820) by 0x62D35BD: __glXInitialize (glxext.c:946) by 0x62CECB3: GetGLXPrivScreenConfig (glxcmds.c:174) by 0x62CF69C: glXQueryExtensionsString (glxcmds.c:1304) by 0x60AA7D9: ??? (in /usr/lib/x86_64-linux-gnu/libwaffle-1.so.0.5.2) by 0x4F81450: wfl_checked_display_connect (piglit-util-waffle.h:74) by 0x4F829E0: piglit_wfl_framework_init (piglit_wfl_framework.c:627) Signed-off-by: Gert Wollny <[email protected]>
* winsys/virgl: correct resource and handle allocation (v2)Gert Wollny2018-09-051-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes crash with piglit/bin/map_buffer_range-invalidate CopyBufferSubData \ increment-offset -auto -fbo * Resize the resource storage already when the count is equal to the allocated size, fixes: Invalid write of size 8 at 0xB72E4CF: virgl_drm_add_res (virgl_drm_winsys.c:629) by 0xB72E4CF: virgl_drm_emit_res (virgl_drm_winsys.c:663) by 0xB72A44A: virgl_encode_resource_copy_region (virgl_encode.c:776) by 0xB40CD12: st_copy_buffer_subdata (st_cb_bufferobjects.c:585) by 0xB244A3B: _mesa_CopyBufferSubData (bufferobj.c:2940) by 0x109A1E: upload (invalidate.c:169) by 0x109C2F: piglit_display (invalidate.c:215) by 0x4F80FBE: run_test (piglit_fbo_framework.c:52) by 0x4F66E5F: piglit_gl_test_run (piglit-framework-gl.c:229) by 0x10949D: main (invalidate.c:47) Address 0xbe07d30 is 0 bytes after a block of size 4,096 alloc'd at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0xB72DAAF: virgl_drm_cmd_buf_create (virgl_drm_winsys.c:567) * Also resize the space allocated for the handles, fixes: Invalid write of size 4 at 0xB72E4F0: virgl_drm_add_res (virgl_drm_winsys.c:631) by 0xB72E4F0: virgl_drm_emit_res (virgl_drm_winsys.c:663) by 0xB72A44A: virgl_encode_resource_copy_region (virgl_encode.c:776) by 0xB40CD12: st_copy_buffer_subdata (st_cb_bufferobjects.c:585) by 0xB244A3B: _mesa_CopyBufferSubData (bufferobj.c:2940) by 0x109A1E: upload (invalidate.c:169) by 0x109C2F: piglit_display (invalidate.c:215) by 0x4F80FBE: run_test (piglit_fbo_framework.c:52) by 0x4F66E5F: piglit_gl_test_run (piglit-framework-gl.c:229) by 0x10949D: main (invalidate.c:47) Address 0xbe08570 is 0 bytes after a block of size 2,048 alloc'd at 0x4C2FB0F: malloc ( in /usr/lib/valgrind/vgpreload_memcheck-amd64- linux.so) by 0xB72DAC8: virgl_drm_cmd_buf_create (virgl_drm_winsys.c:572) Fixes: 4b15b5e803e ("virgl: resize resource bo allocation if we need to.") v2: - Use REALLOC macro and avoid memory leak when re-allocation fails - add Fixes tag (both Emil Velikov) - reorder commit message Signed-off-by: Gert Wollny <[email protected]>