Am 12.07.2015 um 19:30 schrieb Ilia Mirkin: > I asked this on IRC, but figured I'd get wider distribution for the > question. The situation is that nv50 doesn't support RGBA32 MS8 > textures. However QuerySamplesForFormat will try its hardest to find > supported sample counts, which means it'll go down st/mesa's fallback > format list, which includes RGBA16, which can handle MS8 just fine. So > the teximage.c code thinks that the # of samples is OK. > > However when it selects the teximage format, ChooseTextureFormat, > which does not take a sample count, will return RGBA32 (which is > supported for MS1, MS2, MS4 on nv50). When later it attempts to > AllocTextureStorage, it will again attempt to do so using RGBA32 with > MS8, which will fail. The core code handles this case (since texture > storage allocation can happen for a wide variety of reasons), but I > think this is suboptimal. > > Should ChooseTextureFormat take a sample count? This would allow the > driver to provide the "correct" TexFormat for that format / sample > count combo.
Maybe. I got some doubts though this is the correct fix at least in this case. I think st_choose_format should be more clever not to try such fallback formats, at least if that was for some kind of query. In particular RGBA32F is a required supported format (in newer gl versions), thus it is not correct to fallback to something with less bits, msaa or not. Roland > > Cheers, > > -ilia > > PS. See bug > https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D91314&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=Vjtt0vs_iqoI31UfJxBl7yv9I2FeiaeAYgMTLKRBc_I&m=3BB07M6i6rr_12jeHSanF_yCvMJQ0T9C4eU_aPexd5s&s=zbecr-W4tpKpVL_cZ95nluvrNcpMa0ir770_oTNJsiI&e= > but the > assert fail happens due to improper handling in the storage allocation > failure case, which ought to get handled anyways. > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.freedesktop.org_mailman_listinfo_mesa-2Ddev&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=Vjtt0vs_iqoI31UfJxBl7yv9I2FeiaeAYgMTLKRBc_I&m=3BB07M6i6rr_12jeHSanF_yCvMJQ0T9C4eU_aPexd5s&s=PyabKxbFvxr16cgQmADlD5nbqc6U6Ntmvelr6KkJo7w&e= > > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev