Skip to content

iris: Add debug flag to ensure a resource's memory layout is not tiled

Vivek Kasireddy requested to merge Vivek/mesa:texture_notiling into main

What does this MR do and why?

Our goal is to create a dmabuf fd associated with a Pixman image and pass it to a H264 encoder (Gstreamer's x264enc). To accomplish this, we first convert the Pixman image into a texture (via glTexImage2D) and then create an EGL image (target = EGL_GL_TEXTURE_2D_KHR) from it. We finally obtain the dmabuf fd from the EGL image using eglExportDMABUFImageMESA().

The problem we are seeing is that the output of the encoder appears to show corruption. And, this seems to happen because the texture's memory layout becomes tiled when Iris allocates the associated resource in response to glTexImage2D cmd. We do not see this problem if we force Iris to allocate the resource in linear format.

This MR provides one possible way to address this issue.

Merge request reports