summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* i965/blorp: Use more temporary isl_format variablesJason Ekstrand2017-10-261-8/+7
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Cc: [email protected]
* i965/blorp: Use blorp_to_isl_format for src_isl_format in blit_miptreesJason Ekstrand2017-10-261-1/+2
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Cc: [email protected]
* meson: build nouveau vieux driverDylan Baker2017-10-262-0/+95
| | | | | | | | | Build tested only. v2: - fix spelling error (veaux -> vieux) Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: build r200 driverDylan Baker2017-10-262-0/+94
| | | | | | | | | v2: - remove TODO that is done Build tested only Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: build r100 driverDylan Baker2017-10-262-0/+90
| | | | | | | build tested only Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: enable nir path for all shaders.Dave Airlie2017-10-261-9/+1
| | | | | | | | There is no reason to block this here, if a driver enables it, let it handle it. Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/program: add support for gs/tes/tcs nir shaders.Dave Airlie2017-10-263-4/+56
| | | | | | | | This probably needs more work but this just add the initial code to convert gs/tcs/tes nir based shaders in the state tracker. Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/program: rework basic variant interfaceDave Airlie2017-10-263-15/+12
| | | | | | | This just passes st_common_program and uses it. Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* intel/compiler: Call nir_lower_system_values in brw_preprocess_nirJason Ekstrand2017-10-251-2/+0
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* i965/program: Move nir_lower_system_values higher upJason Ekstrand2017-10-251-1/+2
| | | | | | | | We want this to get called before nir_lower_subgroups which is going in brw_preprocess_nir. Now that nir_lower_wpos_ytransform can handle system values, this should be safe to do. Reviewed-by: Lionel Landwerlin <[email protected]>
* glsl_to_tgsi: remove unused glsl_version variableMarek Olšák2017-10-261-3/+0
| | | | trivial
* gles2: support for GL_EXT_occlusion_query_booleanHarish Krupo2017-10-252-7/+25
| | | | | | | | | | | | | | | | Following test checking entrypoints passes: dEQP-EGL.functional.get_proc_address.extension.gl_ext_occlusion_query_boolean Piglit test 'ext_occlusion_query_boolean-any-samples' passes with these changes. No changes/regression observed in WebGL occlusion tests or Intel CI. v2: add es2="2.0" for glapi entrypoints, clean up xml dispatch_sanity changes (fix 'make check') Signed-off-by: Harish Krupo <[email protected]> Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: enum checks for GL_EXT_occlusion_query_booleanTapani Pälli2017-10-251-0/+44
| | | | | | | Some of the checks are valid for generic ES 3.2 as well. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: fix unused var warnings in release buildTimothy Arceri2017-10-256-32/+13
| | | | Reviewed-by: Jordan Justen <[email protected]>
* i965: Call gen6_upload_push_constants() even when the stage is disabled.Kenneth Graunke2017-10-242-18/+16
| | | | | | | | This properly sets stage_state->push_constant_dirty = true, so that we emit 3DSTATE_CONSTANT_XS to disable the constant buffer for the shader stage. It also sets stage_state->push_const_size = 0. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Drop a bunch of downcasting and upcasting of gl_program pointers.Kenneth Graunke2017-10-241-19/+12
| | | | | | | | We have a gl_program and we want a gl_program. There's no point in converting to brw_program and back again. This probably made more sense in the old days before Tim dropped a layer of subclassing. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Move _mesa_shader_write_subroutine_indices down a level.Kenneth Graunke2017-10-242-6/+3
| | | | | | Now we call it in one place instead of making every caller do it. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Don't disable CCS for RT dependencies when dispatching compute.Kenneth Graunke2017-10-243-5/+5
| | | | | | | | | | | Compute shaders don't have access to the framebuffer, so there's no point in worrying whether a texture is bound as a render target. This saves a bunch of resolves in GFXBench4 Manhattan 3.1, but doesn't seem to impact performance at all, at least on Apollolake. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* mesa/bufferobj: don't double negate the rangeDave Airlie2017-10-241-3/+3
| | | | | | | | | | | | | This fixes a regression I introduced refactoring this code, I managed to invert range twice, I moved the inversion into the common code, but forgot to stop doing it in the callee. Fixes: GL45-CTS.multi_bind.dispatch_bind_buffers_base Fixes: 35ac13ed3 (mesa/bufferobj: consolidate some codepaths between ubo/ssbo/atomics.) Reported-by: Nicolai Hähnle <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: use util_strdup() macro in symbol_table.cBrian Paul2017-10-231-2/+3
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* i965: Revert absolute mode for constant buffer pointers.Kenneth Graunke2017-10-232-25/+1
| | | | | | | | | | | | | | | | | | | | | | The kernel doesn't initialize the value of the INSTPM or CS_DEBUG_MODE2 registers at context initialization time. Instead, they're inherited from whatever happened to be running on the GPU prior to first run of a new context. So, when we started setting these, other contexts in the system started inheriting our values. Since this controls whether 3DSTATE_CONSTANT_* takes a pointer or an offset, getting the wrong setting is fatal for almost any process which isn't expecting this. Unfortunately, VA-API and Beignet don't initialize this (nor does older Mesa), so they will die horribly if we start doing this. UXA and SNA don't use any push constants, so they are unaffected. Until we have some kind of solution to this problem, I'm going to revert this patch and abandon using the feature for now. It will lead to fewer pushed UBO ranges on Broadwell+, which may lead to lower performance, though I don't have any data on the impact. Cc: "17.3 17.2" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102774
* nir: Get rid of nir_shader::stageJason Ekstrand2017-10-203-9/+11
| | | | | | | | It's redundant with nir_shader::info::stage. Acked-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* st/mesa: correct a u_vbuf commentMarek Olšák2017-10-201-3/+5
| | | | trivial.
* i965: Report supported context priorities to EGL/DRIChris Wilson2017-10-201-0/+13
| | | | | | | | | | | | | | | Hook up the RendererQuery for __DRI2_RENDERER_HAS_CONTEXT_PRIORITY to report the available DRM_I915_GEM_CONTEXT_SETPARAM options based on the per-client default context. The kernel will validate the request to change the property, so we get an accurate reflection of available support (based on kernel version and privilege) and we should only have to do it once during screen setup -- although the SETPARAM should be fast, they are still an ioctl each. Signed-off-by: Chris Wilson <[email protected]> Cc: Kenneth Graunke <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Pass the EGL/DRI context priority through to the kernelChris Wilson2017-10-203-0/+46
| | | | | | | | | | | | | Decode the EGL/DRI priority enum into the [-1023, 1023] range as interpreted by the kernel and call DRM_I915_GEM_CONTEXT_SETPARAM to adjust the priority. We use 0 as the default medium priority (also the kernel default) and so only need adjust up or down. By only doing the adjustment if not setting to medium, we can faithfully report any error whilst setting without worrying about kernel version. Signed-off-by: Chris Wilson <[email protected]> Cc: Kenneth Graunke <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Record the presence of the kernel schedulerChris Wilson2017-10-201-0/+11
| | | | | | | | | | | Mention to the debug log if the kernel scheduler is enabled; and in particular if it has preemption enabled. Signed-off-by: Chris Wilson <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Ben Widawsky <[email protected]> Reviewed-by: Joonas Lahtinen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* egl,dri: Propagate context priority hint to driver->CreateContextChris Wilson2017-10-2012-23/+38
| | | | | | | | | | | | | | | | | | | | Jump through the layers of abstraction between egl and dri in order to feed the context priority attribute through to the backend. This requires us to read the value from the base _egl_context, convert it to a DRI attribute, parse it again in the generic context creator before passing it to the driver as a function parameter. In order to not require us to pass back the actual value of the context priority after creation, we impose that drivers should report the available set of priorities during screen setup (and then they may chose to fail if given an invalid value as that should have been checked at the user boundary.) Signed-off-by: Chris Wilson <[email protected]> Acked-by: Ben Widawsky <[email protected]> # i915/i965 Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Don't disable aux buffers for non-overlapping miplevels.Kenneth Graunke2017-10-191-3/+7
| | | | | | | | | | | | | | | | | | | | Meta's GenerateMipmap implementation binds the same image for both sampling and rendering - but it samples from one miplevel while rendering the next. This is a false self-dependency, and there's no need to disable auxiliary buffers in this case. In fact, we really want to leave it enabled so the new miplevels gain color compression. Thankfully, the texture object's _MaxLevel is always one shy of the miplevel being rendered. So we can simply check if irb->mt_level is overlaps with the texture's defined levels. If not, there's no self- dependency and we can leave the auxiliary buffers enabled. Fixes a performance regression in GFXBench4 Car Chase, which apparently calls glGenerateMipmap() on every frame. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103247 Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by; Jason Ekstrand <[email protected]>
* i965: Remove the intel_miptree_prepare_fb_fetch wrapper.Kenneth Graunke2017-10-193-20/+10
| | | | | | | | Now that intel_miptree_prepare_texture takes levels and layers, there's not much use in this anymore. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by; Jason Ekstrand <[email protected]>
* i965: Only resolve texture levels/layers that are accessed.Kenneth Graunke2017-10-191-2/+16
| | | | | | | This should avoid unnecessary resolves when working with texture views. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by; Jason Ekstrand <[email protected]>
* i965: Make intel_miptree_prepare_texture() take level/layer arguments.Kenneth Graunke2017-10-193-21/+13
| | | | | | | | | | | | This effectively exports intel_miptree_prepare_texture_slices() as intel_miptree_prepare_texture(). The hope is to avoid resolves for when using texture views that access a subset of the levels/layers. For now, we pass the same arguments to separate the mechanical change from the one that actually modifies our behavior. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by; Jason Ekstrand <[email protected]>
* i965/sbe: fix active components for SSO programs with over 16 inputsIago Toral Quiroga2017-10-191-8/+2
| | | | | | | | | | | | | | | | | | | | | | When we have up to 16 FS inputs, the SF unit will reorder our inputs to be consecutive, however, when we have more than 16 we need to to read our inputs from the URB exactly as they have been output from the previous stage. This means that for SSO we have to consider if we have URB padding due to unused input locations. Specifically, this affects gen9 active components programming, since for things to work in scenarios with over 16 inputs that have padded regions we need to ensure that we program active components for the padded regions too. If we don't do this the hardware won't read the URB properly for inputs located after padded regions. Found empirically. Fixes (these also require a patch in CTS): KHR-GL45.enhanced_layouts.varying_locations KHR-GL45.enhanced_layouts.varying_array_locations Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Do not log a perf warning when mapping an idle boChris Wilson2017-10-191-2/+3
| | | | | | | | | | We only want to scare the user away from causing a GPU stall for mapping a busy bo. The time taken to instantiate the set of pages for a buffer and their mmapping is unavoidable and flagging idle bo as being busy is "crying wolf". Reported-by: Tvrtko Ursulin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Use a union to bitcast a floatMatt Turner2017-10-181-1/+2
| | | | ... which does not break C's aliasing rules.
* st/mesa: set dimension for constants in ATI_fragment_shaderMiklós Máté2017-10-181-0/+4
| | | | | | | | | This fixes an assertion failure introduced by 30a2f0dfd46de. Fixes: 30a2f0dfd46 ("radeonsi: add an assertion that only Signed-off-by: Miklós Máté <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* st/mesa: Initialize textures array in st_framebuffer_validateMichel Dänzer2017-10-181-0/+2
| | | | | | | | | | | | | | | | And just reference pipe_resources to it in the validate callbacks. Avoids pipe_resource leaks when st_framebuffer_validate ends up calling the validate callback multiple times, e.g. when a window is resized. v2: * Use generic stable tag instead of Fixes: tag, since the problem could already happen before the commit referenced in v1 (Thomas Hellstrom) * Use memset to initialize the array on the stack instead of allocating the array with os_calloc. Cc: [email protected] Reviewed-by: Thomas Hellstrom <[email protected]>
* mesa: fix trivial typo in _mesa_PixelMapusv() error stringBrian Paul2017-10-181-1/+1
| | | | | Signed-off-by: Brian Paul <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103323
* Revert "mesa: fix texture updates for ATI_fragment_shader"Marek Olšák2017-10-171-5/+3
| | | | | | | | This reverts commit 9d54025cd1eee3f42b80c062d1f644904bf2ba41. It breaks KOTOR. Cc: 17.1 17.2 <[email protected]>
* mesa: remove redundant NULL check in update_single_program_texture_stateMiklós Máté2017-10-171-2/+0
| | | | | | | | update_single_program_texture() never returns NULL. Signed-off-by: Miklós Máté <[email protected]> Signed-off-by: Marek Olšák <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* meson: build mesa test.Dylan Baker2017-10-162-0/+46
| | | | | | | v2: - add dependency on dispatch.h generator (which this test needs) Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (v1)
* meson: build libmesa_galliumDylan Baker2017-10-161-2/+141
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: Don't try to install dri drivers unless one is builtDylan Baker2017-10-161-1/+1
| | | | | | | | This confused the with_dri flag which is meant to control Direct Rendering Infrastructure, not classic drivers Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* Revert "i965/tex_image: Reference the renderbuffer miptree in setTexBuffer2"Kenneth Graunke2017-10-161-5/+20
| | | | | | | | | | | | | | | | | | | | This reverts commit d80cbbeaff9329fdc78ae3d97097c1e65dfcdd61. It turns out that formats do matter - the framebuffer's miptree has an sRGB format, and the one we created did not. This broke rendering when using KWin compositing, GNOME Terminal Fedora (with a transparent background), and Qt menu rendering in general, to name a few. It's been a month and this hasn't been fixed, and I'm sick of reverting this patch or applying NAK'd hacks and restarting various programs at random times every day, multiple times a day, to keep my desktop environment functional. The only benefit of this patch was to prepare the way for modifiers, which AFAIK aren't finished yet anyway, so there's really no downside to reverting it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102924
* Android: add libmesa_nir dependency to libmesa_dricoreRob Herring2017-10-161-0/+3
| | | | | | | | | | | | | | | Commit 32fcced7b479 ("meta: Unset the textures_used_by_txf bitfield.") added a dependency in libmesa_dricore to NIR headers, but failed to add libmesa_nir as a dependency resulting in a build error: In file included from external/mesa3d/src/mesa/drivers/common/meta.c:90: external/mesa3d/src/compiler/nir/nir.h:48:10: fatal error: 'nir_opcodes.h' file not found Add libmesa_nir as a static library dependency to libmesa_dricore. Fixes: 32fcced7b479 ("meta: Unset the textures_used_by_txf bitfield.") Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* i965: Only put external handles into the handle htChris Wilson2017-10-161-11/+25
| | | | | | | | We know that we will only ever need to lookup an external handle and so can defer adding a bo to the external ht until it is ever exported or imported, keeping that hashtable compact. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/miptree: Drop the invalidate parameter form copy_teximageJason Ekstrand2017-10-163-17/+8
| | | | | | | This was a leftover from i915. The one caller in i965 always passes in false so there's no point in having the parameter. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: minor simplification in test_attachment_completeness()Brian Paul2017-10-141-2/+1
| | | | | | We already have a pointer to the texture object. Use it here. Reviewed-by: Timothy Arceri <[email protected]>
* i965: Rename brw->no_batch_wrap to intel_batchbuffer::no_wrapKenneth Graunke2017-10-135-12/+12
| | | | | | This really makes more sense in the intel_batchbuffer struct. Reviewed-by: Chris Wilson <[email protected]>
* i965: Delete dead brw_context fields.Kenneth Graunke2017-10-132-4/+0
| | | | | | | fast_clear_op is leftover from the meta-fast-clear days. No idea what the other thing was for, but it isn't used now. Reviewed-by: Chris Wilson <[email protected]>
* i965: Complete 'expose RGBA visuals only on Android'Mario Kleiner2017-10-131-2/+2
| | | | | | | | | | | | | | | | Commit 731ba6924a2ed6cdf47a78fd637a91a19ddcf9ed "expose RGBA visuals only on Android" replaced ARRAY_SIZE(formats) by num_formats, but there are 3 loops which add configs, and only one was updated to num_formats. Also update loops for configs with accumulation buffer and multisample configs. Fixes: 731ba6924a2 "i965: expose RGBA visuals only on Android" Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>