summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_image.c
Commit message (Collapse)AuthorAgeFilesLines
* vk: Add SKL supportKristian Høgsberg Kristensen2015-11-251-0/+3
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* anv: Add initial Haswell supportJason Ekstrand2015-11-171-1/+4
|
* anv: Only include the pack headers where neededJason Ekstrand2015-11-161-0/+5
| | | | | | | Previously, we were including gen7_pack.h, gen75_pack.h, and gen8_pack.h in anv_private.h. As we add more gens, this is going to become untenable. This commit moves things around so that we only use the pack headers when and if we need them.
* anv: Use enum isl_tiling everywhereChad Versace2015-11-131-24/+27
| | | | | | | | | In anv_surface and anv_image_create_info, replace member 'uint8_t tile_mode' with 'enum isl_tiling'. As a nice side-effect, this patch also reduces bug potential because the hardware enum values for tile modes are unstable across hardware generations.
* anv: Remove redundant fields anv_format::bs,bw,bh,bdChad Versace2015-11-121-9/+14
| | | | Instead, use the equivalent fields in anv_format::isl_layout.
* anv/image: Determine the alignment units for compressed formatsNanley Chery2015-11-091-2/+4
| | | | | | | | | Alignment units, i and j, match the compressed format block width and height respectively. v2: Don't assert against HALIGN* and VALIGN* enums (Chad) Reviewed-by: Chad Versace <[email protected]>
* anv/image: Handle compressed format qpitch and paddingNanley Chery2015-11-091-3/+8
| | | | Reviewed-by: Chad Versace <[email protected]>
* anv/image: Handle compressed format stride and sizeNanley Chery2015-11-091-2/+4
| | | | | | These formulas did not take compressed formats into account. Reviewed-by: Chad Versace <[email protected]>
* anv: Rename cpp variable to "bs"Nanley Chery2015-11-091-3/+3
| | | | | | | | | | | cpp (chars-per-pixel) is an integer that fails to give useful data about most compressed formats. Instead, rename it to "bs" which stands for block size (in bytes). v2: Rename vk_format_for_bs to vk_format_for_size (Chad) Use "block size" instead of "bs" in error message (Chad) Reviewed-by: Chad Versace <[email protected]>
* anv/image: Add a basic implementation of GetImageSubresourceLayoutJason Ekstrand2015-10-131-2/+44
|
* vk/0.170.2: Update remaining enumsChad Versace2015-10-071-1/+1
|
* vk/0.170.2: Update VkResultChad Versace2015-10-071-19/+8
| | | | | | Version 0.170.2 removes most of the error enums. In many cases, I had to replace an error with a less accurate (or even incorrect) one. In other cases, the error path is replaced with an assertion.
* vk/0.170.2: Merge VkAttachmentView into VkImageViewChad Versace2015-10-071-32/+2
|
* vk/image: Fix retrieval of anv_surface for depthstencil aspectChad Versace2015-10-071-9/+15
| | | | | | | | If anv_image_get_surface_for_aspect_mask() is given a combined depthstencil aspect mask, and the image has a stencil surface but no depth surface, then return the stencil surface. Hacks on hacks.
* vk: Embed two surface states in anv_image_viewChad Versace2015-10-061-86/+113
| | | | | | | | | | | | | This prepares for merging VkAttachmentView into VkImageView. The two surface states are: anv_image_view::color_rt_surface_state: RENDER_SURFACE_STATE when using image as a color render target. anv_image_view::nonrt_surface_state; RENDER_SURFACE_STATE when using image as a non render target. No Crucible regressions.
* vk: Remove stale finishme for stencil image viewsChad Versace2015-10-061-1/+0
| | | | | They don't work completely. But they work well enough to satisfy Crucible.
* vk: Add anv_image::usageChad Versace2015-10-061-0/+24
| | | | | It's a copy of VkImageCreateInfo::usage. Will be used for the VkAttachmentView/VkImageView merge.
* vk/image: Remove stale anv_asserts for depthstencil attachmentsChad Versace2015-10-061-5/+0
| | | | | We don't fully handle mipmapped, array depthstencil attachments. But we handle the well enough for Crucible's miptree tests.
* vk/0.170.2: s/baseArraySlice/baseArrayLayer/Jason Ekstrand2015-10-061-3/+3
|
* vk: Merge anv_attachment_view into anv_image_viewChad Versace2015-10-061-27/+22
| | | | This prepares for merging VkAttachmentView into VkImageView.
* vk/0.170.2: Make destructors return voidJason Ekstrand2015-10-051-9/+3
|
* vk: Merge anv_*_attachment_view into anv_attachment_viewChad Versace2015-10-051-31/+19
| | | | | | Remove anv_color_attachment_view and anv_depth_stencil_view, merging them into anv_attachment_view. This prepares for merging VkAttachmentView into VkImageView.
* vk: Drop anv_surface_viewChad Versace2015-10-051-9/+9
| | | | | | | | | | | Push the members of struct anv_surface_view into anv_image_view and anv_buffer_view, then remove struct anv_surface_view. Observe that anv_surface_view::range is not needed for anv_image_view, and so was dropped there. This prepares for the merge of VkAttachmentView into VkImageView. Remove the common parent of anv_buffer_view and anv_image_view (that is, anv_surface_view) will make the merge easier.
* vk: Use consistent names for anv_*_view variablesChad Versace2015-10-051-28/+29
| | | | | | | | | | | | | Rename all anv_*_view variables to follow this convention: - sview -> anv_surface_view - bview -> anv_buffer_view - iview -> anv_image_view - aview -> anv_attachment_view - cview -> anv_color_attachment_view - ds_view -> anv_depth_stencil_attachment_view This clarifies existing code. And it will reduce noise in the upcoming commits that merge VkAttachmentView into VkImageView.
* vk: Return anv_image_view_info by valueChad Versace2015-10-051-2/+2
| | | | | The struct is only 2 bytes. Returning it on the stack is better than returning a reference into the ELF .data segment.
* vk/image: Document a Vulkan spec requirement for depthstencilChad Versace2015-10-051-3/+5
| | | | | The Vulkan spec (git a511ba2) requires support for some combined depth stencil formats.
* vk/0.170.2: Update VkImageSubresourceRangeChad Versace2015-10-051-23/+35
| | | | Replace 'aspect' with 'aspectMask'.
* vk/image: Teach vkCreateImage about layout of 1D surfacesChad Versace2015-09-141-6/+8
| | | | | Calling vkCreateImage() with VK_IMAGE_TYPE_1D now succeeds and computes the surface layout correctly.
* vk: Teach vkCreateImage about layout of 3D surfacesChad Versace2015-09-141-2/+17
| | | | | | Calling vkCreateImage() with VK_IMAGE_TYPE_3D now succeeds and computes the surface layout correctly. However, 3D images do not yet work for many other Vulkan entrypoints.
* vk: Refactor anv_image_make_surface()Chad Versace2015-09-141-21/+35
| | | | Move the code that calculates the layout of 2D surfaces into a switch case.
* vk: Add new vk_errorf that takes a format stringKristian Høgsberg Kristensen2015-09-031-2/+1
| | | | | | This allows us to annotate error cases in debug builds. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk/image: Add PRM reference for QPitch equationChad Versace2015-09-031-0/+4
| | | | Suggested-by: Nanley Chery <[email protected]>
* vk/image: Linear stencil buffers are illegalChad Versace2015-08-281-6/+20
| | | | | | | The hardware requires that stencil buffer memory be W-tiled. From the Sandybridge PRM: This buffer is supported only in Tile W memory.
* vk/image: Don't abort when creating stencil image viewsChad Versace2015-08-281-1/+0
| | | | | When creating a stencil image view, log a FINISHME but don't abort. We're sooooo close to having this working.
* vk: Don't duplicate anv_depth_stencil_view's surface dataChad Versace2015-08-281-23/+3
| | | | | | | | | | | | | | | | | In anv_depth_stencil_view, replace the members bo depth_offset depth_stride depth_format depth_qpitch stencil_offset stencil_stride stencil_qpitch with the single member const struct anv_image *image The removed members duplicated data in anv_image::depth_surface and anv_image::stencil_surface.
* vk: Fix format of anv_depth_stencil_viewChad Versace2015-08-281-8/+22
| | | | | | The format of the view itself and of the view's image may differ. Moreover, if the view's format has no depth aspect but the image's format does, we must not program the depth buffer. Ditto for stencil.
* vk/image: Let anv_image have one anv_surface per aspectChad Versace2015-08-281-22/+60
| | | | | Split anv_image::primary_surface into two: anv_image::color_surface and depth_surface.
* vk: Add gen7 supportKristian Høgsberg Kristensen2015-08-241-7/+17
| | | | | | | With all the previous commits in place, we can now drop in support for multiple platforms. First up is gen7 (Ivybridge). Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move anv_color_attachment_view_init() to gen8_state.cKristian Høgsberg Kristensen2015-08-241-95/+15
| | | | | | | | | I'd prefer to move anv_CreateAttachmentView() as well, but it's a little too much generic code to just duplicate for each gen. For now, we'll add a anv_color_attachment_view_init() to dispatch to the gen specific implementation, which we then call from anv_CreateAttachmentView(). Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move anv_CreateImageView to gen8_state.cKristian Høgsberg Kristensen2015-08-241-135/+28
| | | | | | | We'll probably want to move some code back into a shared init function, but this gets one GEN8 surface state initialization out of anv_image.c. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk/image: Don't set anv_surface_view::offset twiceChad Versace2015-08-181-1/+0
| | | | | It was set twice a few lines apart, and the second setting always overrode the first.
* vk: Add anv_format reference to anv_render_pass_attachmentChad Versace2015-08-171-1/+4
| | | | | | | Change type of anv_render_pass_attachment::format from VkFormat to const struct anv_format*. This elimiates the repetitive lookups into the VkFormat -> anv_format table when looping over attachments during anv_cmd_buffer_clear_attachments().
* vk/image: Simplify stencil case for anv_image_create()Chad Versace2015-08-171-14/+12
| | | | | | Stop creating a temporary VkImageCreateInfo with overriden format=VK_FORMAT_S8_UINT. Instead, just pass the format override directly to anv_image_make_surface().
* vk: Add anv_format reference t anv_surface_viewChad Versace2015-08-171-9/+4
| | | | | | Change type of anv_surface_view::format from VkFormat to const struct anv_format*. This reduces the number of lookups in the VkFormat -> anv_format table.
* vk: Add anv_format reference to anv_imageChad Versace2015-08-171-17/+10
| | | | | | Change type of anv_image::format from VkFormat to const struct anv_format*. This reduces the number of lookups in the VkFormat -> anv_format table.
* vk: Use anv_image_create() for creating dmabuf VkImageKristian Høgsberg Kristensen2015-08-171-2/+4
| | | | | | | We need to make sure we use the VkImage infrastructure for creating dmabuf images. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Prefix most filenames with anvChad Versace2015-07-171-0/+745
Jason started the task by creating anv_cmd_buffer.c and anv_cmd_emit.c. This patch finishes the task by renaming all other files except gen*_pack.h and glsl_scraper.py.