summaryrefslogtreecommitdiffstats
path: root/src/intel
Commit message (Collapse)AuthorAgeFilesLines
* anv/cmd_buffer: Move gen7 index buffer state to graphics stateJason Ekstrand2018-01-232-13/+13
| | | | | | Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Move num_workgroups to compute stateJason Ekstrand2018-01-232-9/+12
| | | | | | | | While we're here, make it an anv_address. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Move dynamic state to graphics stateJason Ekstrand2018-01-234-30/+33
| | | | | | Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Use a temporary variable for dynamic stateJason Ekstrand2018-01-232-27/+24
| | | | | | | | | We were already doing this for some packets to keep the lines shorter. We may as well just do it for all of them. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Move vb_dirty bits into anv_cmd_graphics_stateJason Ekstrand2018-01-234-7/+7
| | | | | | | | Vertex buffers are entirely a graphics pipeline thing. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Move dirty bits into anv_cmd_*_stateJason Ekstrand2018-01-237-60/+62
| | | | | | Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv: Separate compute and graphics descriptor setsJason Ekstrand2018-01-234-32/+70
| | | | | | | | | | | | | | | | | | The Vulkan spec says: "pipelineBindPoint is a VkPipelineBindPoint indicating whether the descriptors will be used by graphics pipelines or compute pipelines. There is a separate set of bind points for each of graphics and compute, so binding one does not disturb the other." Up until now, we've been ignoring the pipeline bind point and had just one bind point for everything. This commit separates things out into separate bind points. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102897 Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Use anv_descriptor_for_binding for samplersJason Ekstrand2018-01-231-4/+2
| | | | | | Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Add a helper for binding descriptor setsJason Ekstrand2018-01-231-28/+42
| | | | | | | | | This lets us unify some code between push descriptors and regular descriptors. It doesn't do much for us yet but it will. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Refactor ensure_push_descriptor_setJason Ekstrand2018-01-231-11/+13
| | | | | | | | | | | It's now a function which returns the push descriptor set. Since we set the error on the command buffer, returning the error is a little redundant. Returning the descriptor set (or NULL on error) is more convenient. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv: Remove semicolons from vk_error[f] definitionsJason Ekstrand2018-01-231-2/+2
| | | | | | | | | With the semicolons, they can't be used in a function argument without throwing syntax errors. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Add substructs to anv_cmd_state for graphics and computeJason Ekstrand2018-01-235-32/+74
| | | | | | | | Initially, these just contain the pipeline in a base struct. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Use some pre-existing pipeline temporariesJason Ekstrand2018-01-232-7/+5
| | | | | | | | | | There are several places where we'd already saved the pipeline off to a temporary variable but, due to an artifact of history, weren't actually using that temporary everywhere. No functional change. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Rework anv_cmd_state_resetJason Ekstrand2018-01-231-38/+22
| | | | | | | | | | | This splits anv_cmd_state_reset into separate init and finish functions. This lets us share init code with cmd_buffer_create. This potentially fixes subtle bugs where we may have missed some bit of state that needs to get initialized on command buffer creation. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Get rid of the meta query workaroundJason Ekstrand2018-01-233-16/+0
| | | | | | | | Meta has been gone for a long time. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_state: Drop the scratch_size fieldJason Ekstrand2018-01-231-1/+0
| | | | | | | | | This is a legacy left-over from the mechanism we used to use to handle scratch. The new (and better) mechanism doesn't use this. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/pipeline: Don't assert on more than 32 samplersJason Ekstrand2018-01-231-1/+7
| | | | | | | | This prevents an assert when running one unreleased Vulkan game. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv: Return trampoline entrypoints from GetInstanceProcAddrJason Ekstrand2018-01-232-1/+50
| | | | | | | | | | | | | | | | | | | | Technically, the Vulkan spec requires that we return valid entrypoints for all core functionality and any available device extensions. This means that, for gen-specific functions, we need to return a trampoline which looks at the device and calls the right device function. In 99% of cases, the loader will do this for us but, aparently, we're supposed to do it too. It's a tiny increase in binary size for us to carry this around but really not bad. Before: text data bss dec hex filename 3541775 204112 6136 3752023 394057 libvulkan_intel.so After: text data bss dec hex filename 3551463 205632 6136 3763231 396c1f libvulkan_intel.so Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/entrypoints: Use an named tuple for paramsJason Ekstrand2018-01-231-11/+23
| | | | | | This allows us to store a bit more detailed data per-param Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Only advertise enabled entrypointsJason Ekstrand2018-01-233-6/+74
| | | | | | | | | The Vulkan spec annoyingly requires us to track what core version and what all extensions are enabled and only advertise those entrypoints. Any call to vkGet*ProcAddr for an entrypoint for an extension the client has not explicitly enabled is supposed to return NULL. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Add a per-device dispatch tableJason Ekstrand2018-01-232-1/+44
| | | | | | We also switch GetDeviceProcAddr over to use it. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Add a per-instance dispatch tableJason Ekstrand2018-01-232-1/+7
| | | | | | We also switch GetInstanceProcAddr over to use it. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Properly NULL for GetInstanceProcAddr with a null instanceJason Ekstrand2018-01-231-1/+23
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/extensions: Fix VkVersion::c_vk_version for patch == NoneJason Ekstrand2018-01-231-1/+2
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/entrypoints: Parse entrypoints before extensions/featuresJason Ekstrand2018-01-231-15/+17
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/entrypoints: Expose the different dispatch tablesJason Ekstrand2018-01-231-8/+12
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/entrypoints: Split entrypoint index lookup into its own functionJason Ekstrand2018-01-232-5/+16
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/entrypoints: Add a LAYERS helper variableJason Ekstrand2018-01-231-7/+15
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/entrypoints: Add an Entrypoint classJason Ekstrand2018-01-231-50/+63
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Add a per-device table of enabled extensionsJason Ekstrand2018-01-232-0/+5
| | | | | | Nothing uses this at the moment, but we will need it soon. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Use tables for device extension wranglingJason Ekstrand2018-01-233-32/+49
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Add a per-instance table of enabled extensionsJason Ekstrand2018-01-232-0/+6
| | | | | | Nothing needs this yet but we will want it later. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Use tables for instance extension wranglingJason Ekstrand2018-01-233-31/+34
| | | | | | | This lets us move a bunch of stuff out of codegen and back into anv_device.c which is a bit nicer. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/extensions: Generate a header file with extension tablesJason Ekstrand2018-01-235-10/+92
| | | | | | This allows us better introspection into extensions. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/meson: Simplify some dependency and flag trackingJason Ekstrand2018-01-231-9/+16
| | | | | | | This removes some redundant code between libanv_common, libvulkan_intel, and libvulkan_intel_test. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Split anv_extensions.py into two filesJason Ekstrand2018-01-234-157/+189
| | | | | | | The new anv_extensions_gen.py is the code generator while the old anv_extensions.py file is purely declarative. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/meson: Make anv_entrypoints_gen.py depend on anv_extensions.pyJason Ekstrand2018-01-231-1/+2
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* i965: Drop render_target_start from binding table struct.Kenneth Graunke2018-01-223-7/+6
| | | | | | | | | We have to start render targets at binding table index 0 in order to use headerless FB write messages, and in fact already assume this in a bunch of places in the code. Let's finish that off, and not bother storing 0 in a struct to pretend to add it in a few places. Reviewed-by: Iago Toral Quiroga <[email protected]>
* autotools: include meson build files in tarballDylan Baker2018-01-191-1/+9
| | | | | | | | | | | | This adds the meson.build, meson_options.txt, and a few scripts that are used exclusively by the meson build. v2: - Remove accidentally included changes needed to test make dist with LLVM > 3.9 Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* anv: avoid segmentation fault due to vk_error()Samuel Iglesias Gonsálvez2018-01-191-8/+10
| | | | | | | | | | | | | vk_error() is a macro that calls __vk_errorf() with instance == NULL. Then, __vk_errorf() passes a pointer to instance->debug_report_callbacks to vk_debug_error(), which segfaults as this pointer is invalid but not NULL. Fixes: e5b1bd6ab8 "vulkan: move anv VK_EXT_debug_report implementation to common code." Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* intel: Future-proof ring names for aubinator_error_decodeChris Wilson2018-01-181-24/+98
| | | | | | | | | | | | | | | | | | The kernel is moving to a $class$instance naming scheme in preparation for accommodating more rings in the future in a consistent manner. It is already using the naming scheme internally, and now we are looking at updating some soft-ABI such as the error state to use the new naming scheme. This of course means we need to teach aubinator_error_decode how to map both sets of ring names onto its register maps. Signed-off-by: Chris Wilson <[email protected]> Cc: Michel Thierry <[email protected]> Cc: Michal Wajdeczko <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Cc: Lionel Landwerlin <[email protected]> Cc: Kenneth Graunke <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Michel Thierry <[email protected]>
* anv/query: implement multiview interactionsIago Toral Quiroga2018-01-181-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the Vulkan spec with KHX extensions: "If queries are used while executing a render pass instance that has multiview enabled, the query uses N consecutive query indices in the query pool (starting at query) where N is the number of bits set in the view mask in the subpass the query is used in. How the numerical results of the query are distributed among the queries is implementation-dependent. For example, some implementations may write each view's results to a distinct query, while other implementations may write the total result to the first query and write zero to the other queries. However, the sum of the results in all the queries must accurately reflect the total result of the query summed over all views. Applications can sum the results from all the queries to compute the total result." In our case we only really emit a single query (in the first query index) that stores the aggregated result for all views, but we still need to manage availability for all the other query indices involved, even if we don't actually use them. This is relevant when clients call vkGetQueryPoolResults and pass all N queries to retrieve the results. In that scenario, without this patch, we will never see queries other than the first being available since we never emit them. v2: we need the same treatment for timestamp queries. v3 (Jason): - Better an if instead of an early return. - We can't write to this memory in the CPU, we should use MI_STORE_DATA_IMM and emit_query_availability (Jason). v4 (Jason): - No need to take the value to write as parameter, just hard code it to 0. Fixes test failures in some work-in-progress CTS multiview+query tests. Reviewed-by: Jason Ekstrand <[email protected]>
* anv: return VK_ERROR_OUT_OF_DEVICE_MEMORY when surface size is out of HW limitsSamuel Iglesias Gonsálvez2018-01-181-4/+2
| | | | | Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* intel/fs: Optimize and simplify the copy propagation dataflow logic.Francisco Jerez2018-01-171-24/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the dataflow propagation algorithm would calculate the ACP live-in and -out sets in a two-pass fixed-point algorithm. The first pass would update the live-out sets of all basic blocks of the program based on their live-in sets, while the second pass would update the live-in sets based on the live-out sets. This is incredibly inefficient in the typical case where the CFG of the program is approximately acyclic, because it can take up to 2*n passes for an ACP entry introduced at the top of the program to reach the bottom (where n is the number of basic blocks in the program), until which point the algorithm won't be able to reach a fixed point. The same effect can be achieved in a single pass by computing the live-in and -out sets in lock-step, because that makes sure that processing of any basic block will pick up the updated live-out sets of the lexically preceding blocks. This gives the dataflow propagation algorithm effectively O(n) run-time instead of O(n^2) in the acyclic case. The time spent in dataflow propagation is reduced by 30x in the GLES31.functional.ssbo.layout.random.all_shared_buffer.5 dEQP test-case on my CHV system (the improvement is likely to be of the same order of magnitude on other platforms). This more than reverses an apparent run-time regression in this test-case from my previous copy-propagation undefined-value handling patch, which was ultimately caused by the additional work introduced in that commit to account for undefined values being multiplied by a huge quadratic factor. According to Chad this test was failing on CHV due to a 30s time-out imposed by the Android CTS (this was the case regardless of my undefined-value handling patch, even though my patch substantially exacerbated the issue). On my CHV system this patch reduces the overall run-time of the test by approximately 12x, getting us to around 13s, well below the time-out. v2: Initialize live-out set to the universal set to avoid rather pessimistic dataflow estimation in shaders with cycles (Addresses performance regression reported by Eero in GpuTest Piano). Performance numbers given above still apply. No shader-db changes with respect to master. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104271 Reported-by: Chad Versace <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* vulkan: move anv VK_EXT_debug_report implementation to common code.Bas Nieuwenhuizen2018-01-176-173/+62
| | | | | | | | | | For also using it in radv. I moved the remaining stubs back to anv_device.c as they were just trivial. This does not move the vk_errorf/anv_perf_warn or the object type macros, as those depend on anv types and logging. Reviewed-by: Tapani Pälli <[email protected]>
* anv: VkDescriptorSetLayoutBinding can have descriptorCount == 0Samuel Iglesias Gonsálvez2018-01-121-1/+3
| | | | | | | | | | | | | | | | | From Vulkan spec: "descriptorCount is the number of descriptors contained in the binding, accessed in a shader as an array. If descriptorCount is zero this binding entry is reserved and the resource must not be accessed from any stage via this binding within any pipeline using the set layout." Fixes: dEQP-VK.binding_model.descriptor_update.empty_descriptor.uniform_buffer Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Cc: [email protected]
* meson: Use dependencies for nirDylan Baker2018-01-113-12/+15
| | | | | | | | | | | | | | | | | This creates two new internal dependencies, idep_nir_headers and idep_nir. The former encapsulates the generation of nir_opcodes.h and nir_builder_opcodes.h and adding src/compiler/nir as an include path. This ensures that any target that needs nir headers will have the includes and that the generated headers will be generated before the target is build. The second, idep_nir, includes the first and additionally links to libnir. This is intended to make it easier to avoid race conditions in the build when using nir, since the number of consumers for libnir and it's headers are quite high. Acked-by: Eric Engestrom <[email protected]> Signed-off-by: Dylan Baker <[email protected]>
* meson: don't use intermediate variables that are immediately discardedDylan Baker2018-01-113-10/+5
| | | | | | | | | | | | | | | | For things like: loop x = func() list += x end just do: loop list += func() end Acked-by: Eric Engestrom <[email protected]> Signed-off-by: Dylan Baker <[email protected]>
* meson: Use consistent style for testsDylan Baker2018-01-113-26/+33
| | | | | | | Don't use intermediate variables, use consistent whitespace. Acked-by: Eric Engestrom <[email protected]> Signed-off-by: Dylan Baker <[email protected]>
* meson: Use consistent styleDylan Baker2018-01-112-32/+56
| | | | | | | | | | | | | | | | | | | | Currently the meosn build has a mix of two styles: arg : [foo, ... bar], and arg : [ foo, ..., bar, ] For consistency let's pick one. I've picked the later style, which I think is more readable, and is more common in the mesa code base. v2: - fix commit message Acked-by: Eric Engestrom <[email protected]> Signed-off-by: Dylan Baker <[email protected]>