summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* anv: Get rid of gen fall-throughJason Ekstrand2017-10-161-17/+17
| | | | | | | | | | | | In the early days of the Vulkan driver, we thought it would be a good idea to just make genN just fall back to the genN-1 code if it didn't need to be any different for genN. While this seemed like a good idea, it ultimately ended up being far simpler to just recompile everything. We haven't been using the fall-through functionality for some time so we're better off just deleting it so it doesn't accidentally start causing problems. Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/common: Improve the comments for sample positionsJason Ekstrand2017-10-161-0/+65
| | | | | | | These are pulled directly from brw_multisample_state.h Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* radv: update ia_multi_vgt when executing secondary buffersSamuel Pitoiset2017-10-161-0/+5
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: be smarter with the draw packets when executing secondary buffersSamuel Pitoiset2017-10-161-2/+10
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: always dirty some states after executing secondary buffersSamuel Pitoiset2017-10-161-6/+8
| | | | | | | The spec requires the number of buffer to be greater than 0. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: be smarter with pipelines when emitting secondary buffersSamuel Pitoiset2017-10-161-2/+17
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* nir: add component level support to remove_unused_io_vars()Timothy Arceri2017-10-161-16/+21
| | | | Reviewed-by: Eric Anholt <[email protected]>
* glsl: mark xfb inputs as always_active_ioTimothy Arceri2017-10-161-3/+19
| | | | | | | | | We won't split varyings marked as always active because there is no point in doing so. This means we need to mark both sides of the interface as always active otherwise we will have a mismatch and start removing things we shouldn't. Reviewed-by: Eric Anholt <[email protected]>
* nir: add variant of lower_io_to_scalar to be called earlierTimothy Arceri2017-10-162-0/+255
| | | | | | | | | | | This is intended to be called before nir_lower_io() so that we can do some linking optimisations with the results. It can also be used with drivers that don't use nir_lower_io() at all such as RADV. v2: pass mode mask rather than first and last stage integer. Reviewed-by: Eric Anholt <[email protected]>
* nir: add glsl_channel_type() helperTimothy Arceri2017-10-162-0/+29
| | | | Reviewed-by: Eric Anholt <[email protected]>
* nir: add glsl_type_is_64bit() to nir_typesTimothy Arceri2017-10-162-0/+7
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* a2xx: add support for a few 16-bit color rendering formatsIlia Mirkin2017-10-152-1/+11
| | | | | | | | The rest should be possible too, just needs some additional investigation. Passes fbo-*-formats piglit tests. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* freedreno/a20x: Enable rendering to RGBA/RGBXWladimir J. van der Laan2017-10-151-1/+3
| | | | | Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* freedreno/a20x: Fix rendering to BGRXWladimir J. van der Laan2017-10-151-0/+1
| | | | | | | Make sure that BGRX rendering is swapped the correct way around. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Ilia Mirkin <[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]>
* etnaviv: rework TS enable to be a derived stateLucas Stach2017-10-143-5/+43
| | | | | | | | | | | | | | | Draw operations should not use the TS if the TS buffer content is invalid, as this leads to wrong rendering or even GPU hangs. As the TS valid status can change between draws (clear operations changing it to valid, blits using the RS to the color or ZS buffer changing it to invalid), the TS_MEM_CONFIG must be updated before each draw if the status has changed. This fixes the remaining TS related piglit failures (regressions of a standard run against a piglit run with TS completely disabled). Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: skip unused vertex attributes when assigning VS inputsLucas Stach2017-10-141-0/+4
| | | | | | | | | | | | | When not all of the vertex attributes are actually used in the shader, we end up with some inputs without an assigned reg. Those are marked as invalid and must be skipped when assigning the inputs, as those would overwrite other valid inputs otherwise. Fixes piglit drawpixels and a bunch of other tests using the st_draw path. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* radv: do not allocate CMASK for non-MSSA images with 128 bit formatsSamuel Pitoiset2017-10-143-6/+9
| | | | | | | | This saves some useless CMASK initializations/eliminations in the Vulkan SSAO demo. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: set correct INDEX_TYPE for indexed indirect draws on GFX9Samuel Pitoiset2017-10-141-2/+8
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add the draw count buffer to the list of buffersSamuel Pitoiset2017-10-141-0/+2
| | | | | | | | | My guess is that the GPU is going to report VM faults if vkCmdDrawIndirectCountAMD() (and friends) are used. Cc: [email protected] Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* blob: Use intptr_t instead of ssize_tJason Ekstrand2017-10-133-8/+8
| | | | | | | | | | | ssize_t is a GNU extension and is not available on Windows or MacOS. Instead, we use intptr_t which should be effectively equivalent and is part of the C standard. This should fix the Windows and Mac OS builds. Fixes: 3af1c829891a4530682bce113fdd512d4f2de3c6 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103253 Reviewed-by: Jose Fonseca <[email protected]> Tested-by: Vinson Lee <[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]>
* mapi/shared-glapi/test: rework glapitable.h handlingEmil Velikov2017-10-132-3/+4
| | | | | | | | | | | | | | | | | | | | | Currently all the build systems but Meson generate the header in src/mapi/glapi. Meson cannot do that since: - it does not allow user control over the location of output files - moving the generation rule(s) causes explosion due to the unusual structure of glapi and friends - copying the file into the correct location is a non-trivial task To workaround the above deficiency in the least invasive way, let's adjust the #include directive and add a few -I flags to the autotools build. Note: both builddir and srcdir, should be used. Otherwise building from a release tarball fails badly. Cc: Dylan Baker <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Mark Janes <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: fix blob test includesDylan Baker2017-10-131-1/+1
| | | | | | | | | Since blob.h moved up to src/compiler the test should include that instead of src/compiler/glsl fixes: 0e3bd56c6ea783dbc ("compiler: Move blob up a level") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* Revert "make: Fix test to be meson compatible"Emil Velikov2017-10-132-3/+1
| | | | | | | | | | | This reverts commit fc48ad24272799b154de37f6a944eb391bdbbb82. There commit reference the previous commit as it justification of changing behaviour. Although unlike the said commit, there's nothing obviously wrong there. I'll take a look close why Meson fails to pick the file, but in the interim reverting this commit fixes the normal distcheck target.
* st/dri: Add definitions to allow importing 16-bit surfacesMark Thompson2017-10-131-0/+14
| | | | | | | Necessary to support P010/P016 surfaces for video. Signed-off-by: Mark Thompson <[email protected]> Acked-by: Leo Liu <[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]>
* wayland-drm: constify the callbacks struct, take 2Emil Velikov2017-10-133-11/+7
| | | | | | | | | | | Now that wayland-drm (correctly) keeps a local copy of the callbacks, this should not longer cause explosions. After all the symbol is a local, constant data. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Tested-by: Derek Foreman <[email protected]>
* wayland-drm: use a copy of the wayland_drm_callbacks structEmil Velikov2017-10-131-5/+5
| | | | | | | | | | | The callbacks may be called even when they are no longer valid. Say, the user is dlclose(ing) libEGL while the buffers are being destroyed. Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Tested-by: Derek Foreman <[email protected]>
* egl/dri: don't crash when createImageFromRenderbuffer2 is NULLEmil Velikov2017-10-131-1/+2
| | | | | | | | | | | The __DRI_IMAGE version can be 17 or over, while the function pointer is NULL. Guard for that instead of crashing. Fixes: bad24395d91 ("egl/dri: use createImageFromRenderbuffer2 when available") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* meson: Build i915Ville Syrjälä2017-10-132-0/+100
| | | | | | | | | | | Build i915 with meson. More or less copied from i965, with all the unneeded cruft removed, and the libdrm_intel dependency added. Cc: Dylan Baker <[email protected]> Cc: Eric Anholt <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* intel/cs: Make thread_local_id a regular builtin paramJason Ekstrand2017-10-125-40/+37
| | | | | | | | | This is a lot more natural than special casing it all over the place. We still have to do a bit of special-casing in assign_constant_locations but it's not special-cased quite as bad as it was before. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel/compiler: Allocate pull_param in assign_constant_locationsJason Ekstrand2017-10-123-8/+14
| | | | | | | | | | | Now that everything is nicely ralloc'd, we can allocate the pull_param array in assign_constant_locations instead of higher up. We can also re-allocate the param array so that it's exactly the needed size. This should save us some memory because we're not allocating the total needed param space for both push and pull. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Allocate prog_data::[pull_]param deeper inside the compilerJason Ekstrand2017-10-129-88/+55
| | | | | | | | | | | | | Now that we're always growing the param array as-needed, we can allocate the param array in common code and stop repeating the allocation everywere. In order to keep things sane, we ralloc the [pull_]param array off of the compile context and then steal it back to a NULL context later. This doesn't get us all the way to where prog_data::[pull_]param is purely an out parameter of the back-end compiler but it gets us a lot closer. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* ralloc: Allow reparenting to a NULL contextJason Ekstrand2017-10-121-1/+1
| | | | | | | Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline: Refactor setup of the prog_data::param arrayJason Ekstrand2017-10-121-14/+9
| | | | | | | | Now that the only thing we put in the array up-front are client push constants, we can simplify anv_pipeline_compile a bit. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline: Grow the param array for imagesJason Ekstrand2017-10-122-7/+5
| | | | | | | | Before, we were calculating up-front and then filling in later. Now we just grow as needed in anv_nir_apply_pipeline_layout. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline: Whack nir->num_uniforms to MAX_PUSH_CONSTANT_SIZEJason Ekstrand2017-10-121-4/+2
| | | | | | | | | | | | This way any image uniforms end up having locations higher than MAX_PUSH_CONSTANT_SIZE. There's no bug here at the moment, but this consistency will make the next commit easier. Also, because nir_apply_pipeline_layout properly increments nir->num_uniforms when it expands the param array, we no longer need to stomp it to match prog_data::nr_params because it already does. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel/vs: Grow the param array for clip planesJason Ekstrand2017-10-123-5/+14
| | | | | | | | Instead of requiring the caller of brw_compile_vs to figure it out, just grow the param array on-demand. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel/cs: Grow prog_data::param on-demand for thread_local_id_indexJason Ekstrand2017-10-124-22/+9
| | | | | | | | | | Instead of making the caller of brw_compile_cs add something to the param array for thread_local_id_index, just add it on-demand in brw_nir_intrinsics and grow the array. This is now safe to do because everyone is now using ralloc for prog_data::param. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel/compiler: Make brw_nir_lower_intrinsics compute-specificJason Ekstrand2017-10-125-19/+13
| | | | | | | | | It's already only ever called from brw_compile_cs and only handles compute intrinsics. Let's just make it CS-specific. We can always make it handle other stages again later if we want. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel/compiler: Add a helper for growing the prog_data::param arrayJason Ekstrand2017-10-121-0/+13
| | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel/compiler: Stop adding params for texture sizesJason Ekstrand2017-10-122-6/+0
| | | | | | | | We haven't needed this ever since we started using NIR for lowering rectangle textures. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Only add the wpos state reference if we lowered somethingJason Ekstrand2017-10-121-6/+6
| | | | | | | | | | | | Otherwise, in the ARB program case _mesa_add_state_reference may grow the parameter array which will cause brw_nir_setup_arb_uniforms to write past the end of the param array because it only looks at the parameter list length but the parma array is allocated based on nir->num_uniforms. The only reason this hasn't caused us problems is because we are padding out the param array for fragment programs unnecessarily. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel/compiler: Add a flag for pull constant supportJason Ekstrand2017-10-125-2/+13
| | | | | | | | | | | The Vulkan driver does not support pull constants. It simply limits things such that we can always push everything. Previously, we were determining whether or not to push things based on whether or not the prog_data::pull_param array is non-null. This is rather hackish and about to stop working. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline: Ralloc prog_data::param of the compile mem_ctxJason Ekstrand2017-10-121-2/+1
| | | | | | | | | This way we stop leaking it. This is completely safe because, when we hand it off to anv_shader_bin_create or anv_pipeline_cache_upload_kernel, they make a copy of the entire param array. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline: Add a mem_ctx parameter to anv_pipeline_compileJason Ekstrand2017-10-121-33/+39
| | | | | | | | This lets us avoid some of the manual ralloc stealing and prepares for future commits in which we will want to ralloc prog_data::param. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Store image_param in brw_context instead of prog_dataJason Ekstrand2017-10-1214-49/+17
| | | | | | | | | | This burns an extra 10k of memory or so in the case where you don't have any images. However, if you have several shaders which use images, this should be much less memory. It also gets rid of a part of prog_data that really has nothing to do with the compiler. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>