aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: remove out_num_textures from update_texturesMarek Olšák2018-02-081-20/+12
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: don't store non-fragment sampler states and views in st_contextMarek Olšák2018-02-086-62/+61
| | | | | | | | those are unused. st_context: 10120 -> 3704 bytes Reviewed-by: Timothy Arceri <[email protected]>
* i965: perf: cleanup detection of kernel support for loadable configsLionel Landwerlin2018-02-081-15/+2
| | | | | | | | | | | | The initial revision of the patch adding loadable configs was testing the feature's availability by adding a new config successfully and then removing it. A second version tested the availability just by exercising the removal. But some unused code remained. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* i965: perf: use drmIoctl() instead of ioctl()Lionel Landwerlin2018-02-081-2/+2
| | | | | | | | | | | ioctl() might be interrupted, use drmIoctl() instead as it'll retry automatically. Fixes: 27ee83eaf7e "i965: perf: add support for userspace configurations" Cc: "18.0" <[email protected]> Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Tested-by: Mark Janes <[email protected]>
* i965: perf: add debug messages for loaded configsLionel Landwerlin2018-02-081-0/+2
| | | | | | | | This helps figuring out potential problems when metrics don't show up on frameretrace for example. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* r600: implement tg4 integer workaround. (v2)Dave Airlie2018-02-081-0/+162
| | | | | | | | | | | This ports the texture gather integer workaround from radeonsi. This fixes: KHR-GL45.texture_gather.plain-gather-uint/int* v2: add rect support, fix 2d array shadow Reviewed-by: Roland Scheidegger <[email protected]> (on irc) Signed-off-by: Dave Airlie <[email protected]>
* r600: clean up initial shader register setupGlenn Kennard2018-02-081-20/+17
| | | | | | | | This is taken from Glenn Kennards scratch series, but separated out as a cleanup by me. Reviewed-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: partly fix sampleMaskIn valueRoland Scheidegger2018-02-081-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | The hw gives us coverage for pixel, not for individual fragment shader invocations, in case execution isn't per pixel (eg, unlike cm, actually cannot do "real" minSampleShading, it's either per-pixel or per-fragment, but it doesn't really make a difference here). Also, with msaa disabled, the hw still gives us a mask corresponding to the number of samples, where GL requires this to be 1. Fix this up by masking the sampleMaskIn bits with the bit corresponding to the sampleID, if we know this shader is always executed at per-sample granularity. (In case of a per-sample frequency shader and msaa disabled, the sampleID will always be 0, so this works just fine there.) Fixing this for the minSampleShading case will need a shader key (radeonsi uses the prolog part for) (for eg, could get away with a single bit, cm would need more bits depending on sample/invocation ratio, or read the bits from a uniform), unless we'd want to always use a sample mask uniform (which is probably not a good idea, as it would make the ordinary common msaa case slower for no good reason). This fixes some parts of piglit arb_sample_shading-samplemask (with fixed test), in particular those which use a sampleID, still failing others as expected. Reviewed-by: Dave Airlie <[email protected]>
* r600: clean up fragment shader input scan codeRoland Scheidegger2018-02-081-52/+23
| | | | | | | | | | | | | For some reason, we were iterating through the code twice (first just for instructions needing barycentrics, then for instructions and input dcls). Move things around slightly so this is no longer necessary. There also was a unnedeed enabling of the fixed_pt_position_gpr - this is only needed if the per-sample interpolation comes from an input, not from an instruction (just move the assert where it belongs) (since the sample id to sample from comes from a tgsi src in this case, and isn't sampleID). Otherwise there should be no functional change. Reviewed-by: Dave Airlie <[email protected]>
* mesa: (trivial) remove unused ignore_sample_qualifier_parameterRoland Scheidegger2018-02-083-10/+6
| | | | | | | | This parameter for _mesa_get_min_incations_per_fragment() was once used by the intel driver, but it's long gone. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* r600/cm: (trivial) code cleanup for emitting msaa stateRoland Scheidegger2018-02-083-16/+14
| | | | | | No functional change (compile tested only). Reviewed-by: Dave Airlie <[email protected]>
* tgsi: use tgsi_semantic enum type in ureg codeBrian Paul2018-02-072-23/+23
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* st/mesa: use tgsi_semantic enum typeBrian Paul2018-02-072-5/+8
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi: use TGSI enum types in ureg codeBrian Paul2018-02-072-51/+55
| | | | | | v2: fix enum tgsi_interpolate_mode/loc typo. Reviewed-by: Roland Scheidegger <[email protected]>
* st/mesa: use TGSI enum types in st_glsl_to_tgsi.cppBrian Paul2018-02-071-7/+7
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/util: replace uint with tgsi enum typesBrian Paul2018-02-072-6/+7
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/util: replace unsigned with tgsi enum typesBrian Paul2018-02-072-31/+34
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* radv: implement VK_EXT_external_memory_hostFredrik Höglund2018-02-086-8/+137
| | | | | | | Ported from the radeonsi GL_AMD_pinned_memory implementation. Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* r600: fix rendering regression on r6/7 gpusDave Airlie2018-02-081-1/+6
| | | | | | | | Fixes: 2d5b5d267e (r600: work out target mask at framebuffer bind.) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104989 Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi: avoid int-to-pointer-cast warnings on 32bitGrazvydas Ignotas2018-02-081-6/+12
| | | | | | | I hope the actual dropping of MSB is ok, but that's what's already happened before this change. Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: update some query functionsGrazvydas Ignotas2018-02-084-4/+4
| | | | | | | | It seems these were missed when struct pipe_context * argument was added to hud_graph::query_new_value. Fixes: 3132afdf4c "gallium/hud: pass pipe_context explicitly to most functions" Reviewed-by: Marek Olšák <[email protected]>
* Revert "gallium: build ddebug, noop, rbug, trace as part of auxiliary"Roland Scheidegger2018-02-0714-54/+98
| | | | | | This reverts commit 6f82b8d8d0a986aac28e7bec47fc313fb950475c. This broke scons build, and reportedly clover with autotools/meson too.
* gallium: build ddebug, noop, rbug, trace as part of auxiliaryMarek Olšák2018-02-0714-98/+54
| | | | | | | Building gallium is faster by 7.5 seconds on a 4core/8thread 3GHz CPU. (gallium build time is reduced by 15% when building only radeonsi) Non-recursive makefiles are great!
* u_blit: (trivial) fix bogus argument order for set_fragment_shaderRoland Scheidegger2018-02-071-2/+2
| | | | | Amazingly this still worked sometimes, albeit I'm not even sure why... This fixes d7bec6f7a6a2a35c80be939db8532011af1e9b67.
* mesa: fix incorrect type when allocating arraysAndres Rodriguez2018-02-071-4/+4
| | | | | | | | | The array members are have type 'struct gl_buffer_object *' Found by coverity. Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* u_blit,u_simple_shaders: add shader to convert from xrbias formatRoland Scheidegger2018-02-074-16/+78
| | | | | | | | | | | | | | | We need this to handle some oddball dx10 format (DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM). What you can do with this format is very limited, hence we don't want to add it as a gallium format (we could not express the properties of this format as ordinary format properties neither, so like all special formats it would need specific code for handling it in any case). While here, also nuke the array for different shaders for different writemasks, as it was not actually used (always full masks are passed in for generating shaders). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* u_simple_shaders: fix mask handling in util_make_fragment_tex_shader_writemaskRoland Scheidegger2018-02-071-1/+1
| | | | | | | | | | | The writemask handling was busted, since writing defaults to output meant they got overwritten by the tex sampling anyway. Albeit the affected components were undefined, so maybe with some luck it still would have worked with some drivers - if not could as well kill it... (This would have affected u_blitter but not u_blit since the latter always used xyzw mask.) Reviewed-by: Brian Paul <[email protected]>
* autotools: Only build libmesa-st-tests-common.a for tests.Bas Nieuwenhuizen2018-02-071-1/+1
| | | | | | | | We don't need the library if we don't build tests, and building it adds a dependency on gtest which adds a dependency on cxxabi.h. Fixes: 6569b33b6e "mesa/st/tests: unify MockCodeLine* classes" Reviewed-By: Gert Wollny <[email protected]>
* i965: add __DRI2_BLOB support and set cache functionsTapani Pälli2018-02-071-0/+21
| | | | | | | | v2: adjust to change that moved cache from ctx to screen Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* disk cache: add callback functionalityTapani Pälli2018-02-072-0/+67
| | | | | | | | | | | v2: add disk_cache_has_key, disk_cache_put_key support using blob cache (Nicolai, Jordan) v3: rename set_cb as put_cb to match existing naming (Timothy) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* disk cache: initialize cache path and index only when usedTapani Pälli2018-02-071-49/+80
| | | | | | | | | | | | This patch makes disk_cache initialize path and index lazily so that we can utilize disk_cache without a path using callback functionality introduced by next patch. v2: unmap mmap and destroy queue only if index_mmap exists Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glsl/tests: changes to test_disk_cache_create testTapani Pälli2018-02-071-6/+22
| | | | | | | | | | | | | | | Next patch will allow disk_cache instance to be created without path set for it, modify some test cases that assume disk_cache creation to fail with invalid path. Creation should succeed but simple put/get test fail. v2: leave tests as is but check that both cache struct exists and try simple put/get that should fail with invalid path set (Emil) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jordan Justen <[email protected]> (v1) Reviewed-by: Emil Velikov <[email protected]>
* glsl/tests: move utility functions in cache_testTapani Pälli2018-02-071-35/+35
| | | | | | | | | Patch moves functions higher so that we can utilize them from test_disk_cache_create which is modified by next patch. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: add support for EGL_ANDROID_blob_cacheTapani Pälli2018-02-076-0/+70
| | | | | | | | | | | v2: cleanup, move callbacks to _egl_display struct (Emil Velikov) adapt to earlier ctx->screen changes v3: remove useless checking, add _eglSetFuncName (Emil Velikov) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jordan Justen <[email protected]> (v2) Reviewed-by: Emil Velikov <[email protected]>
* dri: add interface for EGL_ANDROID_blob_cache extensionTapani Pälli2018-02-071-1/+25
| | | | | | | | v2: move from __DRIcontext to __DRIscreen (Emil Velikov) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* ac/nir: use new pknorm_i16/u16 and pk_i16/u16 LLVM intrinsicsSamuel Pitoiset2018-02-071-99/+47
| | | | | | | | | | Ported from RadeonSI. Only one F1 2017 shader is affected, code size decreased from 532 to 488 on both Polaris10 and Vega10. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: avoid loading unused VS input componentsSamuel Pitoiset2018-02-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Polaris10: Totals from affected shaders: SGPRS: 122840 -> 120984 (-1.51 %) VGPRS: 78812 -> 78440 (-0.47 %) Spilled SGPRs: 177 -> 129 (-27.12 %) Code Size: 2950028 -> 2941276 (-0.30 %) bytes Max Waves: 17899 -> 17976 (0.43 %) Vega10: Totals from affected shaders: SGPRS: 117144 -> 115776 (-1.17 %) VGPRS: 77580 -> 77532 (-0.06 %) Spilled SGPRs: 0 -> 152 (0.00 %) Code Size: 3352656 -> 3347860 (-0.14 %) bytes Max Waves: 19756 -> 19866 (0.56 %) This increases SGPRs spilling a bit with Talos, but I have some other ideas that might reduce it. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/shader: scan vertex inputs usage maskSamuel Pitoiset2018-02-072-0/+16
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* i965: allocate a SGVS element when VertexID or InstanceID are readIago Toral Quiroga2018-02-071-15/+2
| | | | | | | | | | | | | | | | | | | | Although on gen8+ platforms we can in theory use 3DSTATE_VF_SGVS to put these beyond the last vertex element it seems that we still need to allocate the SVGS element, otherwise we have observed cases where we end up reading garbage. Specifically, the CTS test mentioned below was flaky with a fail rate of ~1% on some gen9+ platforms caused by reading garbage for the gl_InstanceID value. The flakyness goes away as soon as we start allocating the SVGS element. v2: - Do this for gen8+, not just gen9+, and pull the boolean outside the #if block (Jason) Fixes flaky test: KHR-GL45.vertex_attrib_64bit.limits_test Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104335 Reviewed-by: Jason Ekstrand <[email protected]>
* glapi: fix check_table test for non-shared glapi with mesonDylan Baker2018-02-061-2/+3
| | | | | | | | | v2: - Add glapitable_h generated source to requirements Fixes: 3218056e0eb3 ("meson: Build i965 and dri stack") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (v1) Reviewed-by: Emil Velikov <[email protected]> (v1)
* glapi: Don't search through subdirs from glapitable.hDylan Baker2018-02-062-1/+3
| | | | | | | | Because meson won't put it in that folder. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* state_tracker: Don't build st-renumerate-test without shared glapiDylan Baker2018-02-061-0/+2
| | | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glapi: remove APPLE extensions from testDylan Baker2018-02-061-2/+0
| | | | | | | Fixes: 7009955281260fbb ("mesa: Remove GL_APPLE_vertex_array_object stubs") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Ian Romanick <[email protected]>
* glapi/check_table: Remove 'extern "C"' blockDylan Baker2018-02-061-2/+0
| | | | | | | | | | | | Using 'extern "C"' around includes is always incorrect, as the header may contain C++ symbols (as it does in this case), which means it cannot use C linkage. In this case the header has a template in it, which obviously cannot be linked with C linkage rules. Fixes: a29ad2b421b75a1727b ("mesa/tests: Add tests for the generated dispatch table") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: fix test source name for static glapiDylan Baker2018-02-061-1/+1
| | | | | | | fixes: 43a6e84927e3 ("meson: build mesa test.") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glapi: don't walk backwards for includesDylan Baker2018-02-062-3/+5
| | | | | | | | | | Instead just set the proper -I flags and include it from a more standard path. In this case we'll add -Isrc/mesa (which is common), and #include main/foo.h. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: rename gl_vertex_array_object::_VertexAttrib -> _VertexArrayBrian Paul2018-02-064-11/+10
| | | | | | | | | Since the type is gl_vertex_array. Update comment to explain that these arrays are only used by the VBO module. Also rename some local variables in _mesa_update_vao_derived_arrays(). Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa: minor whitespace fixes, line wrapping in texcompress.cBrian Paul2018-02-061-12/+14
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* mesa: simplify _mesa_get_compressed_formats()Brian Paul2018-02-061-117/+83
| | | | | | | Instead of testing for formats==NULL everywhere, just point formats at a dummy array which will be discarded. Reviewed-by: Eric Engestrom <[email protected]>
* util: remove redundant check for the __clang__ macroVlad Golovkin2018-02-061-1/+2
| | | | | | | | | Clang defines __GNUC__ macro, so one doesn't need to check __clang__ macro in this particular case. v2: added comment as per Brian Paul's suggestion Reviewed-by: Brian Paul <[email protected]>