summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* ac/surface: increment surf_index only when tile swizzle is allowedMarek Olšák2017-08-044-4/+7
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/surface: compute tile swizzle only when it's allowedMarek Olšák2017-08-041-2/+4
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/surface: add RADEON_SURF_SHAREABLEMarek Olšák2017-08-042-1/+4
| | | | | | | Shareable textures won't use tile swizzle. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/surface: remove RADEON_SURF_HAS_TILE_MODE_INDEXMarek Olšák2017-08-043-5/+0
| | | | | | | it's useless Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/surface: move tile_swizzle to ac_surface and document itMarek Olšák2017-08-044-8/+25
| | | | | | | Gfx9 will use it too. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: fix handling of NumSamples=1 (v2)Brian Paul2017-08-033-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Mesa we use the convention that if gl_renderbuffer::NumSamples or gl_texture_image::NumSamples is zero, it's a non-MSAA surface. Otherwise, it's an MSAA surface. But in gallium nr_samples=1 is a non-MSAA surface. Before, if the user called glRenderbufferStorageMultisample() or glTexImage2DMultisample() with samples=1 we skipped the search for the next higher number of supported samples and asked the gallium driver to create a surface with nr_samples=1. So we got a non-MSAA surface. This failed to meet the expection of the user making those calls. This patch changes the sample count checks in st_AllocTextureStorage() and st_renderbuffer_alloc_storage() to test for samples > 0 instead of > 1. And we now start querying for MSAA support at samples=2 since gallium has no concept of a 1x MSAA surface. A specific example of this problem is the Piglit arb_framebuffer_srgb-blit test. It calls glRenderbufferStorageMultisample() with samples=1 to request an MSAA renderbuffer with the minimum supported number of MSAA samples. Instead of creating a 4x or 8x, etc. MSAA surface, we wound up creating a non-MSAA surface. Finally, add a comment on the gl_renderbuffer::NumSamples field. There is one piglit regression with the VMware driver: ext_framebuffer_multisample-blit-mismatched-formats fails because now we're actually creating 4x MSAA surfaces (the requested sample count is 1) and we're hitting some sort of bug in the blitter code. That will have to be fixed separately. Other drivers may find regressions too now that MSAA surfaces are really being created. v2: start quering for MSAA support with samples=2 instead of 1. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/docs: add more info about TXF and MSAA texturesBrian Paul2017-08-031-1/+3
| | | | | | | If the texture is multisampled, the coord.w component indicates which sample to fetch. Reviewed-by: Roland Scheidegger <[email protected]>
* st/mesa: minor clean-ups in st_atom_msaa.cBrian Paul2017-08-031-16/+18
| | | | | Whitespace, formatting, combine nr_bits assignment with declaration. Trivial.
* gallium/docs: document automatic per-sample FS executionBrian Paul2017-08-031-0/+6
| | | | | | | | | Both the GLSL 4.00 specs and DX10.1 specs specify that if a fragment shader uses the sample ID or sample position inputs, the shader is automatically run at per sample frequency. Document that expectation for gallium fragment shaders. Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: init more msaa fieldsBrian Paul2017-08-031-0/+2
| | | | | | | | | | | The default values for GL_SAMPLE_SHADING and GL_MIN_SAMPLE_SHADING_VALUE are missing from the state tables in the GL spec, but they're supposed to be GL_FALSE and 0.0, per the GL_ARB_sample_shading spec. Add code for that, just to be explicit. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* st/osmesa: add osmesa framebuffer iface hash table per st managerBruce Cherniak2017-08-031-0/+11
| | | | | | | | | | | | | Commit bbc29393d3 didn't include osmesa state_tracker. This patch adds necessary initialization. Fixes crash in OSMesa initialization. Created-by: Charmaine Lee <[email protected]> Tested-by: Bruce Cherniak <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Cc: 17.2 <[email protected]>
* anv: put anv_extensions.c in gitignoreLionel Landwerlin2017-08-031-0/+1
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* pipe-loader: fix build of dynamic pipe-driversNicolai Hähnle2017-08-035-4/+7
| | | | | | | | | | | | | v2: add libxmlconfig.la to the dynamic pipe_radeonsi driver v3: add libxmlconfig.la to targets/opencl build v4: add EXPAT_LIBS to opencl build (note: for only-opencl builds, Emil's configure.ac changes are also needed) Fixes: bc7f41e11d3 ("gallium: add pipe_screen_config to screen_create functions") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102014 Tested-by: Andy Furniss <[email protected]> Reviewed-by: Emil Velikov <[email protected]> (v1)
* android: anv_extensions.c is generated to libmesa_vulkan_commonTapani Pälli2017-08-031-1/+1
| | | | | | | | | Fixes build error with anv_extensions.c not found for libmesa_anv_entrypoints. Fixes: d62063c "anv: Autogenerate extension query and lookup" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* android: radeonsi: prepare for driver-specific driconf optionsMauro Rossi2017-08-032-1/+18
| | | | | | | | | | | | | Android build changes to avoid the following building error: In file included from external/mesa/src/gallium/targets/dri/target.c:1: external/mesa/src/gallium/auxiliary/target-helpers/drm_helper.h:185:10: fatal error: 'radeonsi/si_driinfo.h' file not found ^ 1 error generated. Fixes: 0f8c5de869 "radeonsi: prepare for driver-specific driconf options" Reviewed-by: Emil Velikov <[email protected]>
* android: ac/common: always build NIR translationMauro Rossi2017-08-031-1/+2
| | | | | | | | | | Android build changes to avoid the following building error: external/mesa/src/gallium/drivers/radeonsi/si_shader_nir.c:505: error: undefined reference to 'ac_nir_translate' Fixes: 86d4b46d66 "ac/common: always build NIR translation" Reviewed-by: Emil Velikov <[email protected]>
* mesa: only check errors when the state change in glLogicOp()Samuel Pitoiset2017-08-031-27/+29
| | | | | | | When this GL call is a no-op, it should be a little faster. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: only check errors when the state change in glBlendEquationSeparateiARB()Samuel Pitoiset2017-08-031-20/+22
| | | | | | | When this GL call is a no-op, it should be a little faster. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Drop unnecessary I915_PARAM_HAS_EXEC_CAPTURE definesKenneth Graunke2017-08-031-3/+0
| | | | | | | | These were only here to keep building without needing to update libdrm. Now that we include i915_drm.h in Mesa, we don't need this - our copy is new enough and has the #define. Trivial.
* ac: add ac_shader_abi.h in distcheckJuan A. Suarez Romero2017-08-031-0/+1
| | | | | | | | | | | | | | | | | | | Fixes: CXXLD addrlib/libamdgpu_addrlib.la ar: `u' modifier ignored since `D' is the default (see `U') ../../../../src/amd/common/ac_nir_to_llvm.c:33:27: fatal error: ac_shader_abi.h: No such file or directory #include "ac_shader_abi.h" ^ compilation terminated. Makefile:985: recipe for target 'common/common_libamd_common_la-ac_nir_to_llvm.lo' failed When running `make distcheck` Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Juan A. Suarez Romero <[email protected]>
* intel/vec4/gs: reset nr_pull_param if DUAL_INSTANCED compile failed.Dave Airlie2017-08-031-0/+1
| | | | | | | | | | | | | | | If dual object compile fails (as seems to happen with virgl a fair bit, and does piglit even have any tests for it?), we end up not restarting the pull params, so we call vec4_visitor::move_uniform_array_access_to_pull_constant a second time and it runs over the ends of the alloc. Fixes: tests/spec/glsl-1.50/execution/geometry/max-input-components.shader_test running inside virgl on ivybridge. Reviewed-by: Kenneth Graunke <[email protected]> Cc: <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/dri2 Plumb the flush_swapbuffer functionality through to dri3Thomas Hellstrom2017-08-033-0/+36
| | | | | | | | | | Implement the state tracker manager drawable interface flush_swapbuffer method by plumbing it through to dri3 if available. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]>
* gallium/st: Add a method to flush outstanding swapbuffersThomas Hellstrom2017-08-034-0/+29
| | | | | | | | | | | | | Add a state tracker interface method to flush outstanding swapbuffers, and add a call to it from the mesa state tracker during glFinish(). This doesn't strictly mean the outstanding swapbuffers have actually finished executing but is sufficient for glFinish() to be able to be used as a replacement for glXWaitGL(). Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]>
* glx/dri3: Implement the flush_swapbuffers methodThomas Hellstrom2017-08-031-1/+29
| | | | | | | | Provide a dri3 implementation for the image loader extension method. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium: introduce PIPE_CAP_MEMOBJTimothy Arceri2017-08-0317-0/+17
| | | | | | | | | | | | | | This can be used to guard support for EXT_memory_object and related extensions. v2: update gallium docs v3 (Timothy Arceri): - add cap to nv50 Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* i965/blit: Remember to include miptree buffer offset in relocsChris Wilson2017-08-022-3/+3
| | | | | | | | Remember to add the offset to the start of the buffer in the relocation or else we write 0xff into random bytes elsewhere. Reviewed-by: Kenneth Graunke <[email protected]> Cc: [email protected]
* i965: Fix indentationMatt Turner2017-08-022-8/+8
|
* radv: Add suballocation for shaders.Bas Nieuwenhuizen2017-08-035-21/+93
| | | | | | | | | | | | | This reduces the number of BOs that we need for the BO lists during a submission. Currently uses a fairly simple linear search for finding free space, that could eventually be improved to a binary tree, which with some per-node info could make a check for space O(1) and finding it O(log n), in the number of buffers in that slab. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* i965: Set "Subslice Hashing Mode" to 16x16 on Apollolake.Kenneth Graunke2017-08-022-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of 4.11, the kernel isn't bothering to set the subslice hashing mode on Apollolake, leaving it at the default of 8x8. (It initializes it to 16x4 on most platforms.) Performance data for GPUTest Triangle on Apollolake at 1024x640: X-tiled RT: ----------- 8x8 -> 16x4: 2.4325% +/- 0.383683% (n=107) 8x8 -> 8x4: -3.75105% +/- 0.592491% (n=40) 8x8 -> 16x16: 6.17238% +/- 0.67157% (n=30) Y-tiled RT: ----------- 8x8 -> 16x4: 1.30307% +/- 0.297292% (n=205) 8x8 -> 8x4: -0.769282% +/- 0.729557% (n=35) 8x8 -> 16x16: 3.00254% +/- 0.715503% (n=40) 8x MSAA RT (INTEL_FORCE_MSAA=8): -------------------------------- 8x8 -> 16x4: 1.38889% +/- 0.93729% (n=7) 8x8 -> 8x4: -2.10643% +/- 1.15153% (n=3) 8x8 -> 16x16: 3.87183% +/- 1.08851% (n=5) Based on this, we choose 16x16 for Apollolake. Skylake GT2 with X-tiled buffers appears to be a toss-up between 16x4 and 16x16, and with Y-tiled buffers it doesn't seem to really matter. So we'll leave Skylake alone for now. The hashing mode doesn't seem to make a measurable impact on more complex benchmarks. Acked-by: Matt Turner <[email protected]>
* mesa/dri: drop unneeded mm.h includeDave Airlie2017-08-034-4/+0
| | | | | | | | This isn't used in any of these drivers. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r300: drop u_mm.h include.Dave Airlie2017-08-034-4/+0
| | | | | | | This is not used in any of these files. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* util: use cannonical form of ARRAY_SIZEEmil Velikov2017-08-021-1/+1
| | | | | | | Namely sizeof(foo)/sizeof((foo)[0]) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* i965: simplify intel_image_format_lookup()Emil Velikov2017-08-021-7/+3
| | | | | | | Drop the local variable and return directly. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: annotate struct intel_image_format as constEmil Velikov2017-08-023-10/+10
| | | | | | | Already used as such througout the code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* st/dri: NULL check before deref DRI loader .getCapabilityEmil Velikov2017-08-021-2/+4
| | | | | | | | | | | | | One could have vX+1 which introduces another entrypoint without implementing older ones. v2: Rebase, while keeping loaderPrivate Fixes: 1bf703e4ea5 ("dri_interface,egl,gallium: only expose RGBA visuals on Android") Cc: 17.2 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl: check the correct function pointerEric Engestrom2017-08-022-1/+3
| | | | | | | | | | `.swap_interval` != `.SwapInterval`... Fixes: 991ec1b81a76de24fd01 "egl: make platform's SwapInterval() optional" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102015 Cc: Cedric Sodhi <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Tested-by: Cedric Sodhi <[email protected]>
* i965: Delete pitch alignment assertion in get_blit_intratile_offset_el.Kenneth Graunke2017-08-021-1/+0
| | | | | | | | | | | | | The cacheline alignment restriction is on the base address; the pitch can be anything. Fixes assertion failures when using primus (say, on glxgears, which creates a 300x300 linear BGRX surface with a pitch of 1200): intel_blit.c:190: get_blit_intratile_offset_el: Assertion `mt->surf.row_pitch % 64 == 0' failed. Cc: [email protected] Reviewed-by: Chris Wilson <[email protected]>
* swr/rast: fix core / knights split of AVX512 intrinsicsTim Rowley2017-08-024-55/+69
| | | | | | | | Move AVX512BW specific intrinics to be Core-only. Move some AVX512F intrinsics back to common implementation file. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: simplify knob default value setupTim Rowley2017-08-022-14/+11
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: split gen_knobs templates into .h/.cppTim Rowley2017-08-025-118/+166
| | | | | | | Switch to a 1:1 mapping template:generated for future maintenance. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: gen_knobs template code styleTim Rowley2017-08-021-2/+2
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: switch gen_knobs.cpp licenseTim Rowley2017-08-021-12/+17
| | | | | | | Unintentionally added with an apache2 license; relicense to match the rest of the tree. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: fix scons gen_knobs.h dependencyTim Rowley2017-08-021-1/+1
| | | | | | | | Copy/paste error was duplicating a gen_knobs.cpp rule. Fixes: 5079c277b57 ("swr: [scons] Fix windows build") Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: constify swr rasterizerTim Rowley2017-08-0218-323/+339
| | | | | | Add "const" as appropriate in method/function signatures. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: SIMD16 shaders - widen fetch and vertex shadersTim Rowley2017-08-026-5/+238
| | | | | | Work in progress, disabled by default. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: vmask() implementations for KNLTim Rowley2017-08-021-0/+14
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: rename frontend pVertexStoreTim Rowley2017-08-021-6/+9
| | | | | | Rename to reflect global nature. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: fix movemask_ps / movemask_pd on AVX512Tim Rowley2017-08-021-2/+7
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: stop using MSFT types in platform independent codeTim Rowley2017-08-0214-31/+35
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: enable USE_SIMD16_FRONTEND by defaultTim Rowley2017-08-021-1/+1
| | | | Reviewed-by: Bruce Cherniak <[email protected]>