<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<style>
font{
line-height: 1.6;
}
ul,ol{
padding-left: 20px;
list-style-position: inside;
}
</style>
<div style="font-family:微软雅黑,Verdana,"Microsoft Yahei",SimSun,sans-serif;font-size:14px; line-height:1.6;">
<div></div><div>
<div>
<span>
<br>
</span>
</div><div>Hi,all</div><div><br></div><div>i am trying support yuv12 buffer for (GFX9,GFX10, vega64,vega56,rx580) </div><div>when i modify code gralloc_drm_pipe.c and try to alloc YUV12 buffer for app.</div><div>pm->screen->is_format_supported(pm->screen, YUV12,PIPE_TEXTURE_2D) return not support,</div><div>could you give me some help or more information about radeonsi support yv12 buffer?</div><div><br></div><div><div style="line-height: 22.4px;">attachment is my app test code. it will try to pipe_alloc a yv12 buffer, and copy yv12 data to it, and swapbuffer.</div><div style="line-height: 22.4px;">but i found radeonsi (mesa drivers for amd gpu) return not support yv12 format.</div></div><div><br></div><div>the detail radeonsi code is:</div><div><br></div><div><div>input: usage = (PIPE_BIND_SHARED|PIPE_BIND_LINEAR|PIPE_BIND_SAMPLER_VIEW)</div><div>intput: format= 0x32315659 ;(PIPE_FORMAT_YV12)</div><div><br></div><div>static bool si_is_format_supported(struct pipe_screen *screen,</div><div> enum pipe_format format,</div><div> enum pipe_texture_target target,</div><div> unsigned sample_count,</div><div> unsigned storage_sample_count,</div><div> unsigned usage)</div><div>{</div><div> //PIPE_BIND_SAMPLER_VIEW不支持</div><div> si_is_sampler_format_supported {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> if chip_class >= GFX10( vega56=GFX9,rx580=GFX8,vega64=GFX9)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> gfx10_format_table.h {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> /* PIPE_FORMAT_YV12 is not supported */</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> /* PIPE_FORMAT_YV16 is not supported */</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> /* PIPE_FORMAT_IYUV is not supported */</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> /* PIPE_FORMAT_NV12 is not supported */</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> /* PIPE_FORMAT_NV21 is not supported */</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> }</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> </div><div><span class="Apple-tab-span" style="white-space:pre"> </span> si_translate_texformat//return not support <span style="line-height: 22.4px;">PIPE_BIND_SAMPLER_VIEW</span></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div> //PIPE_BIND_SHARED </div><div> si_is_colorbuffer_format_supported {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>si_translate_colorformat!=V_028C70_COLOR_INVALID</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>si_translate_colorswap!=~0U</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>//<span style="line-height: 1.6;">} return not support </span><span style="line-height: 22.4px;">PIPE_BIND_SHARED</span><span style="line-height: 22.4px;"> </span></div><div><br></div><div>}</div></div><div><br></div><div><br></div><div><br></div><div><span><br></span></div>
<div>
<span>
<br>
</span>
</div>
<div id="ntes-pcmac-signature" style="font-family:'微软雅黑'">
<div style="font-size:14px; padding: 0; margin:0;line-height:14px;">
<div style="padding-bottom:6px;margin-bottom:10px;border-bottom:1px solid #e6e6e6;display:inline-block;">
<a href="https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=ifquant&uid=ifquant%40163.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyelogo%2FdefaultAvatar.png&items=%5B%22ifquant%40163.com%22%5D" style="display:block;background:#fff; max-width: 400px; _width: 400px;padding:15px 0 10px 0;text-decoration: none; outline:none;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:none !important;text-size-adjust:none !important;">
<table cellpadding="0" style="width: 100%; max-width: 100%; table-layout: fixed; border-collapse: collapse;color: #9b9ea1;font-size: 14px;line-height:1.3;-webkit-text-size-adjust:none !important;text-size-adjust:none !important;">
<tbody style="font-family: 'PingFang SC', 'Hiragino Sans GB','WenQuanYi Micro Hei', 'Microsoft Yahei', '微软雅黑', verdana !important; word-wrap:break-word; word-break:break-all;-webkit-text-size-adjust:none !important;text-size-adjust:none !important;">
<tr class="firstRow">
<td width="38" style="padding:0; box-sizing: border-box; width: 38px;">
<img width="38" height="38" style="vertical-align:middle; width: 38px; height: 38px; border-radius:50%;" src="https://mail-online.nosdn.127.net/qiyelogo/defaultAvatar.png">
</td>
<td style="padding: 0 0 0 10px; color: #31353b;">
<div style="font-size: 16px;font-weight:bold; width:100%; white-space: nowrap; overflow:hidden;text-overflow: ellipsis;">ifquant</div>
</td>
</tr>
<tr width="100%" style="font-size: 14px !important; width: 100%;">
<td colspan="2" style="padding:10px 0 0 0; font-size:14px !important; width: 100%;">
<div style="width: 100%;font-size: 14px !important;word-wrap:break-word;word-break:break-all;">ifquant@163.com</div>
</td>
</tr>
</tbody>
</table>
</a>
</div>
</div>
<div style="font-size:12px;color:#b5b9bd;line-height:18px;">
<span>签名由</span>
<a style="text-decoration: none;color:#4196ff;padding:0 5px;" href="https://mail.163.com/dashi/dlpro.html?from=mail81">网易邮箱大师</a>
<span>定制</span>
</div>
</div>
</div><!--😀-->
</div>
</body>
</html>