summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* anv: Keep track of whether the data cache should be enabled in L3Jordan Justen2016-05-173-1/+11
| | | | | | | | If images or shader buffers are used, we will enable the data cache in the the L3 config. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/formats: Add support for VK_FORMAT_B4G4R4A4_UNORM pre-gen8Jason Ekstrand2016-05-171-0/+10
|
* anv: Add a devinfo argument to the get_format functionsJason Ekstrand2016-05-175-15/+20
|
* anv/formats: Set the swizzle to RGB1 when using an RGBA format to fake RGBJason Ekstrand2016-05-171-2/+5
| | | | | | | | | This way we get correct sampling from RGB formats that are faked as RGBA. This should also cause it to disable rendering and blending on those formats. We should be able to render to them and, on Broadwell and above, we can blend on them with work-arounds. However, we'll add support for that more properly later when it's deemed useful. For now, disabling rendering and blending should be safe.
* anv/formats: Refactor anv_get_formatJason Ekstrand2016-05-171-30/+27
| | | | | | The new code removes the switch statement and instead handles depth/stencil as up-front special cases. This allows for potentially more complicated color format handling in the future.
* anv: Use 16 bits for the isl_format in anv_formatJason Ekstrand2016-05-171-1/+1
| | | | This way the entire anv_format structure fits in 32 bits
* anv/formats: Use the isl_channel_select enum for the swizzleJason Ekstrand2016-05-173-20/+24
|
* anv/formats: Add an anv_get_format helperJason Ekstrand2016-05-175-66/+58
| | | | | | | | | This commit removes anv_format_for_vk_format and adds an anv_get_format helper. The anv_get_format helper returns the anv_format by-value. Unlike anv_format_for_vk_format the format returned by anv_get_format is 100% accurate and includes any tweaks needed for tiled vs. linear. anv_get_isl_format is now just a wrapper around anv_get_format that picks off just the isl_format.
* anv/format: Simplify anv_formatJason Ekstrand2016-05-172-55/+39
| | | | | | Now that we have VkFormat introspection and we've removed everything that tried to use anv_format for introspection, we no longer need most of what was in anv_format.
* anv/formats: Delete validate_GetPhysicalDeviceFormatPropertiesJason Ekstrand2016-05-171-10/+0
| | | | | All it ever did was some extra logging that was useful when initially bringing up Dota2. We don't need it anymore.
* anv/image: Use aspects for computing full usageJason Ekstrand2016-05-171-4/+3
|
* anv: Remove the anv_format member from anv_imageJason Ekstrand2016-05-173-4/+2
|
* anv/wsi: Use vk_format_info for asserts rather than anv_formatJason Ekstrand2016-05-172-2/+4
|
* anv/copy: Use the linear format from the image for the buffer block sizeJason Ekstrand2016-05-171-1/+4
| | | | | | Because the buffer is exposed to the user, the block size is defined to always exactly be the size of the actual vulkan format. This is the same size (it had better be) as the linaer image format.
* anv/image: Stop using anv_format for image create validationJason Ekstrand2016-05-171-6/+2
|
* anv/image: Make heavier use of aspectsJason Ekstrand2016-05-171-50/+34
|
* anv/copy: Use the color_surf from the image to get the block sizeJason Ekstrand2016-05-171-9/+20
|
* anv: Change render_pass_attachment.format to a VkFormatJason Ekstrand2016-05-173-5/+8
|
* anv: Add helpers to provide simple VkFormat introspectionJason Ekstrand2016-05-172-1/+67
| | | | | | | | As much as I hate adding yet more format introspection, there are times when the VkFormat is sufficient and we don't want to round-trip through isl_format. For these times, the new vk_format_info.c/h files provide some simple driver-agnostic VkFormat introspection. This intended to be specific to Vulkan but not to any driver whatsoever.
* anv/image: Use get_isl_format when creating buffer viewsJason Ekstrand2016-05-171-5/+6
|
* anv/image: Add an aspects fieldJason Ekstrand2016-05-174-8/+10
| | | | | This makes several checks easier and allows us to avoid calling anv_format_for_vk_format in a number of cases.
* anv: Make format_for_descriptor return an isl_formatJason Ekstrand2016-05-173-13/+11
|
* anv/wayland: Don't allow non-renderable formatsJason Ekstrand2016-05-171-4/+7
|
* anv/wsi: Make WSI per-physical-device rather than per-instanceJason Ekstrand2016-05-176-66/+70
| | | | | This better maps to the Vulkan object model and also allows WSI to at least know the hardware generation which is useful for format checks.
* i965/fs: Add an allow_spilling flag to brw_compile_fsJason Ekstrand2016-05-171-1/+2
| | | | | | | | | This allows us to disable spilling for blorp shaders since blorp state setup doesn't handle spilling. Without this, blorp fails hard if you run with INTEL_DEBUG=spill. Reviewed-by: Francisco Jerez <[email protected]> Tested-by: Francisco Jerez <[email protected]>
* nir/builder: Add a helper for grabbing multiple channels from an ssa defJason Ekstrand2016-05-141-3/+1
| | | | | | | This is similar to nir_channel except that it lets you grab more than one channel by providing a mask. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Organize prog_data by ksp number rather than SIMD widthJason Ekstrand2016-05-144-49/+21
| | | | | | | | | | The hardware packets organize kernel pointers and GRF start by slots that don't map directly to dispatch width. This means that all of the state setup code has to re-arrange the data from prog_data into these slots. This logic has been duplicated 4 times in the GL driver and one more time in the Vulkan driver. Let's just put it all in brw_fs.cpp. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Rework the persample shading key/prog_data bitsJason Ekstrand2016-05-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit reworks and simplifies the way we handle persample shading in the shader key and prog_data. The previous approach had three different key bits that had slightly different and hard-to-decern meanings while the new bits are far more clear. This commit changes it to two easily understood bits that communicate everything we need: 1) key->persample_interp: means that the user has requested persample interpolation through the API. This is equivalent to having SAMPLE_SHADING enabled and having MIN_SAMPLE_SHADING_VALUE set high enough that you actually get multiple per-sample invocations. 2) key->multisample_fbo: means that the shader will be running on an actual multi-sampled framebuffer. This commit also adds a new "persample_dispatch" bit to prog_data which indicates that the shader should be run in persample mode. This way the state setup code doesn't have to look at the fragment program or GL state and can just pull that data out of the prog_data. In theory, this shuffle could mean more recompiles. However, in practice, we were shoving enough state into the key before that we were probably hitting a recompile on every per-sample shader anyway. Reviewed-by: Kenneth Graunke <[email protected]>
* anv/copy: Fix copying Images from Buffers with larger dimensionsNanley Chery2016-05-131-8/+11
| | | | | | | | | | | | | This function previously assumed that the Buffer and Image had matching dimensions. However, it is possible to copy from a Buffer with larger dimensions than the Image. Modify the copy function to enable this. v2: Use ternary instead of MAX for setting bufferExtent (Jason Ekstrand) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95292 Signed-off-by: Nanley Chery <[email protected]> Tested-by: Matthew Waters <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Don't advertise shaderImageGatherExtendedJason Ekstrand2016-05-121-1/+1
| | | | | We don't actually support all of the extended gather functionality so we shouldn't be advertising it.
* anv: fix build breakRob Clark2016-05-111-1/+1
| | | | | | | | | Previous rename of lower-output-to-temps pass predated merging of anv, and apparently vulkan wasn't enabled in my local builds so overlooked this when rebasing. Reported-by: Mark Janes <[email protected]> Signed-off-by: Rob Clark <[email protected]>