summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* anv: Add a --disable-vulkan-icd-full-driver-path optionJason Ekstrand2016-08-252-2/+8
| | | | | | | | This option makes installed Vulkan ICD files contain only a driver library name and not a path. This is intended for distros to help them work around multi-arch issues. Reviewed-by: Dave Airlie <[email protected]>
* anv: meta_blit2d: adapt texel fetch pitch for fake w-tiledLionel Landwerlin2016-08-241-1/+3
| | | | | | | | | | | | | We need to compute detiling coordinates using the physical size of W tiling (128x32) rather than the logical size (64x64). v2: Correct comment (Jason) Fixes dEQP-VK.api.copy_and_blit.image_to_image_stencil Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97448 Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/clear: Clear E5B9G9R9 images as R32_UINTJason Ekstrand2016-08-231-2/+14
| | | | | | | | | | | | | We can't actually clear these images normally because we can't render to them. Instead, we have to manually unpack the rgb9e5 color value on the CPU and clear it as R32_UINT. We still have a bit of work to do to clear non-power-of-two images, but this should get all of the power-of-two clears working on at least Haswell. This fixes three of the new Vulkan CTS tests in the dEQP-VK.api.image_clearing.clear_color_image.* group. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Cc: "12.0" <[email protected]>
* anv/clear: Make cmd_clear_image take an actual VkClearValueJason Ekstrand2016-08-231-5/+5
| | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Cc: "12.0" <[email protected]>
* anv/blit2d: Add support for RGB destinationsJason Ekstrand2016-08-231-2/+214
| | | | | | | | This fixes 104 of the new image_clearing and copy_and_blit Vulkan CTS tests. Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* anv/blit2d: Add a format parameter to bind_dst and create_iviewJason Ekstrand2016-08-231-5/+10
| | | | | | Signed-off-by: Jasosn Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Cc: "12.0" <[email protected]>
* anv/image: Don't create invalid render target surfacesJason Ekstrand2016-08-231-1/+12
| | | | Signed-off-by: Jason Ekstrand <[email protected]>
* anv/formats: Don't use an RGBX format if it isn't renderableJason Ekstrand2016-08-231-1/+2
| | | | | | | | | | The whole point of using RGBX is so that we can render to it so if it isn't renderable, that kind-of defeats the purpose. Some formats (one example is R32G32B32X32_SFLOAT) exist in the format table but aren't actually renderable. Eventually, we'd like to get away from RGBX entirely, but this fixes hangs on BDW today. Signed-off-by: Jason Ekstrand <[email protected]>
* anv: Throw INCOMPATIBLE_DRIVER for non-fatal initialization errorsJason Ekstrand2016-08-221-5/+3
| | | | | | | | | | | The only reason we should throw INITIALIZATION_FAILED is if we have found useable intel hardware but have failed to bring it up for some reason. Otherwise, we should just throw INCOMPATIBLE_DRIVER which will turn into successfully advertising 0 physical devices Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Bas Nieuwenhuizen <[email protected]>
* anv: GetDeviceImageFormatProperties: fix TRANSFER formatsLionel Landwerlin2016-08-221-16/+6
| | | | | | | | | | | | | We let the user believe we support some transfer formats which we don't. This can lead to crashes when actually trying to use those formats for example on dEQP-VK.api.copy_and_blit.image_to_image.* tests. Let all formats we can render to or sample from as meta implements transfers using attachments. Signed-off-by: Lionel Landwerlin <[email protected]> Cc: Jason Ekstrand <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Give the installed intel_icd.json file an absolute pathJason Ekstrand2016-08-203-2/+8
| | | | | | | | | | | | Not providing a path allows the ICD to work on multi-arch systems but breaks it if you install anywhere other than /usr/lib. Given that users may be installing locally in .local or similar, we probably do want to provide a filename. Distros can carry a revert of this commit if they want an intel_icd.json file without the path. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* genxml/gen9: Make 3DSTATE_SBE::AttributeActiveComponentFormat an arrayJason Ekstrand2016-08-191-35/+3
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv: remove dummy VK_DEBUG_MARKER_EXT entry pointsmil Velikov2016-08-181-20/+0
| | | | | | | | | | | | The vkCmdDbgMarker{Begin,End} symbols are exported, yet the json does no advertise that the driver supports the extension. Furthermore the functions are empty stubs. Remove those until we get a proper implementation and json notation. Cc: "12.0" <[email protected]> Cc: Jason Ekstrand <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* anv: do not export the Vulkan APIEmil Velikov2016-08-181-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | With version 1 of the Loader interface there is an internal/private symbol (vk_icdGetInstanceProcAddr) which is used to retrieve all the API from the Vulkan entrypoints from the ICD. Implying that exposing the Vulkan API is not recommended. Version 2 goes a step further explicitly forbiding the ICD from exposing Vulkan symbols (and adding a negotiation API) As a reference: - Nvidia 367.35 Missing negotiation API - version 1. Exposes only vk_icdGetInstanceProcAddr. - AMD 16.30.3.306809 Have negotiation API - version 2, Exposes vk_icdGetInstanceProcAddr. Exposes a couple of Vulkan entry points - seems to be in violation with the spec. Cc: "12.0" <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: automake: build with -BsymbolicEmil Velikov2016-08-181-0/+1
| | | | | | | | | Explicitly suggested in the Loader interface version 2 section, but it's good idea either way. It essentially, ensures that our symbols are not interposed. Cc: "12.0" <[email protected]> Cc: Jason Ekstrand <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* anv: automake: use VISIBILITY_CFLAGS to restrict symbol visibilityEmil Velikov2016-08-182-3/+7
| | | | | | | | | | | Hide the internal symbols and annotate the vk_icdGetInstanceProcAddr as public since the loader needs it (since v1 of the loader interface). v2: Add VISIBILITY_CFLAGS to AM_CFLAGS (Ken) Cc: "12.0" <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> (v1) Signed-off-by: Emil Velikov <[email protected]>
* anv: remove internal 'validate' layerEmil Velikov2016-08-182-110/+11
| | | | | | | | | | | Presently the layer has only a single entry point. As mentioned by Jason the function does not validate anything that isn't checked elsewhere, thus we can drop the whole thing. Cc: "12.0" <[email protected]> Cc: Jason Ekstrand <[email protected]> Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* anv: fix writemask on blit fragment shader.Dave Airlie2016-08-161-1/+1
| | | | | | | | | I'm not sure if anything even uses this, but I found this on radv, so just fix it on anv for consistency. Reviewed-by: Jason Ekstrand <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
* anv: add genX_multisample.h to the sources list(s).Emil Velikov2016-08-151-0/+1
| | | | | | Otherwise it won't end up in the release tarball. Signed-off-by: Emil Velikov <[email protected]>
* anv/x11: Add support for Xlib platformKevin Strasser2016-08-153-15/+80
| | | | | | | | | | | Some applications continue to use the Xlib client library and expect that VK_KHR_xlib_surface will be available in the driver. Service these applications by converting the Display pointer to xcb_connection_t and use the existing xcb code in the driver. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* anv: pipeline: gen7: fix assert in debug modeLionel Landwerlin2016-08-121-0/+4
| | | | | | | | | | SampleMask is only 8bits long on gen7. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97278 Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* anv/device: Add limits for InterpolationOffsetAnuj Phogat2016-08-121-3/+3
| | | | | | | | Fixes the vulkan cts regression in test dEQP-VK.api.info.device.properties Cc: Mark Janes <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Use macro to avoid code duplication for sample positionsAnuj Phogat2016-08-123-92/+106
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/device: Enable sample shading on gen7+Anuj Phogat2016-08-091-1/+1
| | | | | | | Passes all 30 min_sample_shading tests in vulkan cts. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/gen7_pipeline: Set multisample state using shared functionAnuj Phogat2016-08-091-16/+4
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/pipeline: Add sample locations for gen7-7.5Anuj Phogat2016-08-091-0/+47
| | | | | | | | | | V1: Add multisample positions (Nanley) V2: Fix 8x sample positions to match OpenGL (Anuj) V3: Vulkan has standard sample locations. They need not be same as in OpenGL. (Anuj) Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/pipeline: Move emit_ms_state() to genX_pipeline_util.hAnuj Phogat2016-08-092-40/+40
| | | | | | | This will help sharing multisample state setting code. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/pipeline/gen7: Set multisample modesLionel Landwerlin2016-08-083-3/+14
| | | | | | | | | | | | | | | | | Fixes the following failures : dEQP-VK.api.copy_and_blit.resolve_image.whole_4_bit dEQP-VK.api.copy_and_blit.resolve_image.whole_8_bit dEQP-VK.api.copy_and_blit.resolve_image.partial_4_bit dEQP-VK.api.copy_and_blit.resolve_image.partial_8_bit dEQP-VK.api.copy_and_blit.resolve_image.with_regions_4_bit dEQP-VK.api.copy_and_blit.resolve_image.with_regions_8_bit Tested on IVB/HSW Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/pipeline: rename info to rs_info in emit_rs_stateLionel Landwerlin2016-08-081-8/+8
| | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/pipeline/gen7: Set the depth format in 3DSTATE_SFJason Ekstrand2016-08-083-2/+25
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline: Unify 3DSTATE_RASTER and 3DSTATE_SF setup between gen7 and gen8Jason Ekstrand2016-08-083-91/+62
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline/gen8: Set 3DSTATE_SF::StatisticsEnableJason Ekstrand2016-08-081-0/+1
| | | | | | | | | We've been setting it in gen7 forever but never in gen8; best to make it consistent. This hasn't caused any problems yet because we don't advertise support for statistics queries yet. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline/gen8: Unconditionally set DXMultisampleRasterizaitonEnableJason Ekstrand2016-08-081-9/+2
| | | | | | | | | | | | | | | | | | The multisample rasterization mode is computed based on this field, 3DSTATE_RASTER::DXMultisampleRasterizationMode (only for forced multisampling), 3DSTATE_RASTER::APIMode, and the number of samples. There are two tables in the SKL PRM that describe how the final multisample mode is calculated: "Windower (WM) Stage >> Multisampling >> Multisample ModeState >> Table 1" and the formula for "SF_INT::Multisample Rasterization Mode". The "DX Multisample Rasterization Enable" bit changes whether multisample mode is set to OFF_PIXEL or ON_PATTERN in the samples > 1 case. In the samples == 1 case, the bit has no effect. Since Vulkan has no concept of disabling multisampling for samples > 1, we can just set the bit. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline/gen8: Use fewer designated initializers in emit_rs_stateJason Ekstrand2016-08-081-26/+27
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* genxml: Make 3DSTATE_SF more consistent between gen7 and gen8+Jason Ekstrand2016-08-081-2/+2
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline/gen8: Remove an old commentJason Ekstrand2016-08-081-2/+0
| | | | | | | This is now handled in emit_3dstate_clip Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/gen7_pipeline: Set PixelShaderKillPixel for discardsNanley Chery2016-08-051-0/+1
| | | | | | | | | | According to the IVB PRM Vol2 P1, this bit must be set if a pixel shader contains a discard instruction. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97207 Cc: "12.0" <[email protected]> Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Perform rasterizer discard in the SOL stage instead of the clipper.Kenneth Graunke2016-07-304-3/+12
| | | | | | | | | See commit b0629e6894513a2c49a018bc3342a4e55435a236, where we discovered that the SOL stage's "Rendering Disable" feature is a lot faster at throwing away all geometry than the clipper's "reject all" mode. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Enable per sample shading on gen8+Anuj Phogat2016-07-282-4/+1
| | | | | | | | | | | | | Vulkan CTS test results on gen9: ./deqp-vk --deqp-case=dEQP-VK.pipeline.multisample.min_sample_shading* Test run totals: Passed: 60/90 (66.7%) Failed: 0/90 (0.0%) Not supported: 30/90 (33.3%) Warnings: 0/90 (0.0%) Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/pipeline: Fix setting per sample shading in pixel shaderAnuj Phogat2016-07-281-4/+1
| | | | | | | | | | | | We should use the persample_dispatch variable in prog_data. Fixes all (~60) the DEQP sample shading tests. Many tests exited with VK_ERROR_OUT_OF_DEVICE_MEMORY without this patch. V2: Use the shader key bits set in brw_compile_fs (Jason) Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/pipeline: Set up point coord enablesJason Ekstrand2016-07-221-0/+5
| | | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Lionel Landwerlin <[email protected]> Cc: "12.0" <[email protected]>
* anv/image: Assert that the image format is actually supportedJason Ekstrand2016-07-221-2/+5
| | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* anv/pipeline: Set binding_table.gather_texture_startJason Ekstrand2016-07-221-0/+1
| | | | | | | | This should get texture gather working on gen8+ and mostly working on gen7. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* anv: Properly call gen75_emit_state_base_address on Haswell.Kenneth Graunke2016-07-201-1/+1
| | | | | | | | | | This should fix MOCS values. Caught by Coverity. CID: 1364155 Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Unify 3DSTATE_CLIP code across generations.Kenneth Graunke2016-07-203-43/+41
| | | | | | | | | | The bulk of this is the same. There are just a couple fields that only exist on one generation or another, and we can easily handle those with an #ifdef. Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Enable early culling on Gen7.Kenneth Graunke2016-07-201-0/+1
| | | | | | | | We set the cull mode, but forgot the enable bit. Gen8 uses this. Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Fix near plane clipping on Gen7/7.5.Kenneth Graunke2016-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Gen7/7.5 clip code used APIMODE_OGL, while the Gen8+ clip code used APIMODE_D3D. The meaning hasn't changed, so one of these must be wrong. It appears that the hardware documentation is completely wrong. It claims that the "API Mode" bit means: 0h APIMODE_OGL NEAR_VP boundary == 0.0 (NDC) 1h APIMODE_D3D NEAR_VP boundary == -1.0 (NDC) However, DirectX typically uses 0.0 for the near plane, while unextended OpenGL uses -1.0. i965's gen6_clip_state.c uses APIMODE_D3D for the GL_ZERO_TO_ONE case, so I believe the meanings are backwards from what the documentation says. Section 23.2 ("Primitive Clipping") of the Vulkan 1.0.21 specification contains the following equations: -w_c <= x_c <= w_c -w_c <= y_c <= w_c 0 <= z_c <= w_c This means that Vulkan follows D3D semantics. Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* genxml: Add APIMODE_D3D missing enum values and improve consistency.Kenneth Graunke2016-07-201-1/+1
| | | | | | Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* genxml: Add CLIPMODE_* prefix to 3DSTATE_CLIP's "Clip Mode" enum values.Kenneth Graunke2016-07-201-1/+1
| | | | | | | | | Gen6-7.5 use CLIPMODE_REJECT_ALL, while Gen8+ just used REJECT_ALL. Being consistent will let me unify code, and I prefer having the prefix. Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* compiler: Rename INTERP_QUALIFIER_* to INTERP_MODE_*.Kenneth Graunke2016-07-173-6/+6
| | | | | | | | | | | | | | | | | Likewise, rename the enum type to glsl_interp_mode. Beyond the GLSL front-end, talking about "interpolation modes" seems more natural than "interpolation qualifiers" - in the IR, we're removed from how exactly the source language specifies how to interpolate an input. Also, SPIR-V calls these "decorations" rather than "qualifiers". Generated by: $ find . -regextype egrep -regex '.*\.(c|cpp|h)' -type f -exec sed -i \ -e 's/INTERP_QUALIFIER_/INTERP_MODE_/g' \ -e 's/glsl_interp_qualifier/glsl_interp_mode/g' {} \; Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Dave Airlie <[email protected]>