summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* anv/pipeline: Silently pass tests if depth or stencil is missingJason Ekstrand2016-06-033-3/+35
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* anv/pipeline: Unify gen7/8 emit_ds_stateJason Ekstrand2016-06-033-85/+60
| | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* genxml/gen6,7,75: s/BackFace/BackfaceJason Ekstrand2016-06-032-2/+2
| | | | | | | | This is more consistent with gen8+ Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* anv/pipeline: Refactor specialization constant handling a bitJason Ekstrand2016-06-031-5/+4
| | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* anv/clear: Handle ClearImage on 3-D imagesJason Ekstrand2016-06-031-2/+4
| | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* anv: add the X related and Wayland CFLAGS to VULKAN_ENTRYPOINT_CPPFLAGSEmil Velikov2016-06-041-0/+2
| | | | | | | | | | Otherwise we will fail to find the headers in some scenarios. Cc: <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reported-by: Tobias Klausmann <[email protected]> Tested-by: Tobias Klausmann <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]>
* i965: Remove old CS local ID handlingJordan Justen2016-06-011-4/+1
| | | | | | | | | | | | | The old method pushed data for each channels uvec3 data of gl_LocalInvocationID. The new method pushes 1 dword of data that is a 'thread local ID' value. Based on that value, we can generate gl_LocalInvocationIndex and gl_LocalInvocationID with some calculations. Cc: "12.0" <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Support new local ID generation & cross-thread constantsJordan Justen2016-06-014-48/+42
| | | | | | | | | | | | | | | | | The cross thread constant support appears on Haswell. It allows us to upload a set of uniform data for all threads without duplicating it per thread. We also support per-thread data which allows us to store a per-thread ID in one of the uniforms that can be used to calculate the gl_LocalInvocationIndex and gl_LocalInvocationID variables. v4: * Support the old local ID push constant layout as well (Jason) Cc: "12.0" <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Store number of threads in brw_cs_prog_dataJordan Justen2016-06-016-12/+8
| | | | | | Cc: "12.0" <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Add uniform for a CS thread local base IDJordan Justen2016-06-011-0/+4
| | | | | | | | | | | | v4: * Force thread_local_id_index to -1 for now, and have fs_visitor::setup_cs_payload look at thread_local_id_index. This enables us to more easily cut over from the old local ID layout to the new layout, as suggested by Jason. Cc: "12.0" <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: let anv_entrypoints_gen.py generate proper Wayland/Xcb guardsEmil Velikov2016-05-311-0/+28
| | | | | | | | | | | | | | The generated sources should follow the example set by the vulkan headers and our non-generated code. Namely: the code for all supported platforms should be available, each one guarded by its respective VK_USE_PLATFORM_*_KHR macro. v2: Reword commit message. Cc: Mark Janes <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96285 Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> (v1 over IRC)
* automake: move the git_sha1.h rule a level upEmil Velikov2016-05-301-1/+1
| | | | | | | | | | | | | | | This way we can reuse the header from other places like - src/intel/vulkan and src/gallium. Only the former is hooked up atm. Make sure .gitignore is updated, as well as all the users (the mesa code does not need any changes). Also ensure that the file is always created by adding it to the BUILT_SOURCES target. Cc: Jason Ekstrand <[email protected]> Cc: Kristian Høgsberg Kristensen <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* anv: automake: don't forget to cleanup dev_icd.jsonEmil Velikov2016-05-301-1/+1
| | | | | | | | | | Otherwise `make distcheck' will barf at us as the file is dangling. Ideally this should be part of the clean-local hook, although we include install-lib-links.mk which already has one. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: automake: bring back VULKAN_ENTRYPOINT_CPPFLAGSEmil Velikov2016-05-301-2/+6
| | | | | | | | | | | | | We should not have removed them in the first place. There's a subtle difference between generating the complete sources and using them which was not obvious as we nuked them. Without this, the release tarball ends up without various hunks of the generated sources, thus things fail at a later stage as we attempt to build them. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: automake: ship the json files in the release tarballEmil Velikov2016-05-301-1/+3
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: bail out if anv_wsi_init() failsEmil Velikov2016-05-301-1/+3
| | | | | | | | | | | | | | Otherwise we'll end up setting up a device with no winsys integration. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> --- Hard-coding the rendernode name in anv_physical_device_init() is a bad idea really. We could/should be using drmGetDevices() to get info on all the devices (master/render/etc. node names, pci location etc.) and apply our heuristics on top of that. That can come up as a follow up change.
* anv: resolve wayland-only buildEmil Velikov2016-05-301-0/+2
| | | | | | | | | | | Ensure that the final X11/XCB hunk is guarded by the correct macro. Otherwise we'll require the symbol even when building without said platform. Cc: Cedric Sodhi <[email protected]> Reported-by: Cedric Sodhi <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Fix use of uninitialized variable.Robert Foss2016-05-301-2/+6
| | | | | | | | | | | | | The return variable was not set for failure paths. It has now been changed to VK_ERROR_INITIALIZATION_FAILED for failure paths. Coverity: 1358944 Reviewed-by: Eric Engestrom <[email protected]> Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Emil Velikov <[email protected]> [Emil Velikov: rebase against master, s/vulkan/anv/] Signed-off-by: Emil Velikov <[email protected]>
* anv/cmd_buffer: Don't delete command buffers in ResetCommandPool()Ronie Salgado2016-05-271-19/+18
| | | | | | | v2 (Jason Ekstrand): Destroy command buffers in DestroyCommandPool(). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95034 Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Try the first 8 render nodes instead of just renderD128Jason Ekstrand2016-05-271-4/+10
| | | | | | | | This way, if you have other cards installed, the Vulkan driver will still work. No guarantees about WSI working correctly but offscreen should at least work. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95537
* anv: strdup the device path into the physical deviceJason Ekstrand2016-05-272-2/+4
| | | | | This way we don't have to assume that the string coming in is a piece of constant data that exists forever.
* anv/formats: Exit early for unsupported formatsJason Ekstrand2016-05-271-2/+3
|
* anv/formats: Map VK_FORMAT_UNDEFINED to ISL_FORMAT_UNSUPPORTEDJason Ekstrand2016-05-271-1/+1
| | | | | | At one point in time, we may have used the mapping to ISL_FORMAT_RAW for certain buffer surfaces but that time has long since passed. This fixes a bug where doing format queries on VK_FORMAT_UNDEFINED would assert-fail.
* anv/clear: Remove an unused variableJason Ekstrand2016-05-271-1/+0
|
* anv: Emit DRAWING_RECTANGLE once at driver initializationJason Ekstrand2016-05-272-13/+9
| | | | | | | | | | Also, we don't actually need it for clipping because meta always colors inside the lines and, for all other operations, the user is required to set a scissor. Since DRAWING_RECTANGLE stalls the GPU, we want to emit it as little as possible. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* anv/cmd_buffer: Only emit PIPE_CONTROL on-demandJason Ekstrand2016-05-276-70/+140
| | | | | | | | | | | This is in contrast to emitting it directly in vkCmdPipelineBarrier. This has a couple of advantages. First, it means that no matter how many vkCmdPipelineBarrier calls the application strings together it gets one or two PIPE_CONTROLs. Second, it allow us to better track when we need to do stalls because we can flag when a flush has happened and we need a stall. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* anv/clear: Only clear the render area when doing subpass clearsJason Ekstrand2016-05-273-4/+3
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* anv: Move push constant allocation to the command bufferJason Ekstrand2016-05-275-44/+71
| | | | | | | | | | Instead of blasting it out as part of the pipeline, we put it in the command buffer and only blast it out when it's really needed. Since the PUSH_CONSTANT_ALLOC commands aren't pipelined, they immediately cause a stall which we would like to avoid. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* anv: Stop linking against libmesa.la and libdri_test_stubs.laJason Ekstrand2016-05-262-4/+3
| | | | | | | | This brings the final size of an optimized non-debug build of the Vulkan driver down to 2.9 MB as opposed to 8.7 MB for the dri driver. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* anv/formats: Use isl_format_supports* for format introspectionJason Ekstrand2016-05-231-22/+19
|
* anv/formats: Make alpha blending a property of render targetsNanley Chery2016-05-231-4/+2
| | | | | | | | In agreement with the SNB PRM, alpha blending is a property that render targets may or may not support. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: remove define _DEFAULT_SOURCEEmil Velikov2016-05-233-6/+0
| | | | | | | The build systems already add this as applicable. There's no need to have this in the source file. Signed-off-by: Emil Velikov <[email protected]>
* vk/intel: use negative VK_NO_PROTOTYPES schemeEric Engestrom2016-05-231-1/+0
| | | | | | | | | | 3d0fac7aca237bbe8ed8e2a362d3b42d0ef8c46c changed all VK_PROTOTYPES to VK_NO_PROTOTYPES This brings the Intel header in line with the rest of the Vulkan code. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* anv/nir_apply_pipeline_layout: Pass the nir_src from the nir_tex_srcEduardo Lima Mitev2016-05-211-1/+1
| | | | | | | nir_instr_rewrite_src() expects a nir_src and it is currently being fed a nir_tex_src. This will crash something. Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Delete brw_wm_prog_key::render_to_fbo and drawable_height.Kenneth Graunke2016-05-201-4/+0
| | | | | | | | | | | | Now that we handle flipping and other gl_FragCoord transformations via a uniform, these key fields have no users. This patch actually eliminates the associated recompiles. The Tomb Raider benchmark's minimum FPS increases from ~1 FPS to a reasonable number. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965, anv: Use NIR FragCoord re-center and y-transform passes.Kenneth Graunke2016-05-201-0/+5
| | | | | | | | | | | | | | This handles gl_FragCoord transformations and other window system vs. user FBO coordinate system flipping by multiplying/adding uniform values, rather than recompiles. This is much better because we have no decent way to guess whether the application is going to use a shader with the window system FBO or a user FBO, much less the drawable height. This led to a lot of recompiles in many applications. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* anv: Merge in my TODO list itemsKristian Høgsberg Kristensen2016-05-201-0/+11
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* anv: Enable textureCompressionASTC_LDR on Gen9+Nanley Chery2016-05-202-29/+29
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/format: Reorder ASTC mappings to match ISL enum orderingNanley Chery2016-05-201-14/+14
| | | | | | | Keep the lists consistent for ease of use. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/pipeline: Bounds-check resource indices when robuts_buffer_access is enabledJason Ekstrand2016-05-191-17/+35
|
* anv/pipeline: Only do buffer bounds checks if robustBufferAccess is enabledJason Ekstrand2016-05-191-1/+7
|
* anv/apply_dynamic_offsets: Use rewrite_src instead of a regular assignmentJason Ekstrand2016-05-191-4/+5
| | | | | | Originally we removed the instruction, changed the source, and then re-inserted it. This works, but nir_instr_rewrite_src is a bit more obviously correct.
* anv/device: Add a boolean for robust buffer accessJason Ekstrand2016-05-192-0/+4
|
* anv: Add a TODO fileJason Ekstrand2016-05-191-0/+23
|
* anv/device: Fix viewportBoundsRangeNanley Chery2016-05-181-1/+1
| | | | | | | | | | | | Align with the spec requirement that the range must be at least [−2 × maxViewportDimensions, 2 × maxViewportDimensions − 1]. Our hardware supports this. Fixes dEQP-VK.api.info.device.properties Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94896 Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* anv/batch_chain: free pointers for error casesMark Janes2016-05-181-2/+2
| | | | | | | | Trivial fix to improperly handled cleanup during VK_ERROR_OUT_OF_HOST_MEMORY. Identified by Coverity: CID 1358908 and 1358909 Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Fix warning: unused variable ‘cs_prog_data’Jordan Justen2016-05-172-2/+0
| | | | | | | This was introduced in 8a80af282091e692da7bf4e412918ba2362dfb4f. Reported-by: Jason Ekstrand <[email protected]> Signed-off-by: Jordan Justen <[email protected]>
* Revert "HACK: Don't re-configure L3$ in render stages pre-BDW"Jordan Justen2016-05-171-11/+0
| | | | | | | This reverts commit 41af9b2e517dd0c17e519490ca915b96f6898390. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94468 Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Port L3 cache programming from i965Jordan Justen2016-05-179-173/+593
| | | | | Signed-off-by: Jordan Justen <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* anv/gen7: Add memory barrier to vkCmdWaitEvents callJordan Justen2016-05-171-0/+6
| | | | | | | | | | | | We also have this barrier call for gen8 vkCmdWaitEvents. We don't implement waiting on events for gen7 yet, but this barrier at least helps to not regress CTS cases when data caching is enabled. Without this, the tests would intermittently report a failure when the data cache was enabled. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>