anv_image_get_surface_for_aspect(image, range->aspect);
uint32_t depth = 1; /* RENDER_SURFACE_STATE::Depth */
+ uint32_t rt_view_extent = 1; /* RENDER_SURFACE_STATE::RenderTargetViewExtent */
const struct anv_format *format_info =
anv_format_for_vk_format(pCreateInfo->format);
* the range of this field is reduced to [0,1023].
*/
depth = range->arraySize;
+
+ /* From the Broadwell PRM >> RENDER_SURFACE_STATE::RenderTargetViewExtent:
+ *
+ * For Render Target and Typed Dataport 1D and 2D Surfaces:
+ * This field must be set to the same value as the Depth field.
+ */
+ rt_view_extent = depth;
break;
case VK_IMAGE_TYPE_3D:
/* From the Broadwell PRM >> RENDER_SURFACE_STATE::Depth:
* depth of the base MIP level.
*/
depth = image->extent.depth;
+
+ /* From the Broadwell PRM >> RENDER_SURFACE_STATE::RenderTargetViewExtent:
+ *
+ * For Render Target and Typed Dataport 3D Surfaces: This field
+ * indicates the extent of the accessible 'R' coordinates minus 1 on
+ * the LOD currently being rendered to.
+ */
+ rt_view_extent = iview->extent.depth;
break;
default:
unreachable(!"bad VkImageType");
.Width = image->extent.width - 1,
.Depth = depth - 1,
.SurfacePitch = surface->stride - 1,
+ .RenderTargetViewExtent = rt_view_extent - 1,
.MinimumArrayElement = range->baseArraySlice,
.NumberofMultisamples = MULTISAMPLECOUNT_1,
.XOffset = 0,
anv_format_for_vk_format(pCreateInfo->format);
uint32_t depth = 1; /* RENDER_SURFACE_STATE::Depth */
+ uint32_t rt_view_extent = 1; /* RENDER_SURFACE_STATE::RenderTargetViewExtent */
aview->base.attachment_type = ANV_ATTACHMENT_VIEW_TYPE_COLOR;
* the range of this field is reduced to [0,1023].
*/
depth = pCreateInfo->arraySize;
+
+ /* From the Broadwell PRM >> RENDER_SURFACE_STATE::RenderTargetViewExtent:
+ *
+ * For Render Target and Typed Dataport 1D and 2D Surfaces:
+ * This field must be set to the same value as the Depth field.
+ */
+ rt_view_extent = depth;
break;
case VK_IMAGE_TYPE_3D:
/* From the Broadwell PRM >> RENDER_SURFACE_STATE::Depth:
* depth of the base MIP level.
*/
depth = image->extent.depth;
+
+ /* From the Broadwell PRM >> RENDER_SURFACE_STATE::RenderTargetViewExtent:
+ *
+ * For Render Target and Typed Dataport 3D Surfaces: This field
+ * indicates the extent of the accessible 'R' coordinates minus 1 on
+ * the LOD currently being rendered to.
+ */
+ rt_view_extent = aview->base.extent.depth;
break;
default:
unreachable(!"bad VkImageType");
.Width = image->extent.width - 1,
.Depth = depth - 1,
.SurfacePitch = surface->stride - 1,
+ .RenderTargetViewExtent = rt_view_extent - 1,
.MinimumArrayElement = pCreateInfo->baseArraySlice,
.NumberofMultisamples = MULTISAMPLECOUNT_1,
.XOffset = 0,