From: Henri Verbeet Subject: Re: [PATCH] wined3d: Check GLSL version when using ARB_shader_bit_encoding with uvec4. Message-Id: Date: Fri, 19 Apr 2019 17:00:39 +0430 In-Reply-To: References: <20190418170649.27930-1-gofmanp@gmail.com> <21120c18-061e-d959-16cf-df27fe6d2abb@gmail.com> On Fri, 19 Apr 2019 at 16:38, Paul Gofman wrote: > On 4/19/19 14:42, Henri Verbeet wrote: > > On Fri, 19 Apr 2019 at 15:42, Paul Gofman wrote: > > It may be worth trying to make it work with ivec4() instead of > > uvec4(). Ironlake is perhaps a little special in that it does have > > true integer support, but not GLSL 1.30. > > > Do you think it will be portable when converting special values from > signed integers? As I read the specs, converting NaN with > (u)intBitsToFloat() is already undefined, but seems to work. Won't > representing specials through signed integers be leaving more room for > different behaviour on various cards, drivers and GLSL versions? I can > sure make it and test on what I have here, but it seems hard to be sure > how universally this will work. > That and "negative" values are the main issues I'd be potentially worried about, but at the same time I wouldn't expect drivers/hardware to go out of their way to distinguish between singned/unsigned here. We could also potentially switch between uvec4 and ivec4 based on whether we have GLSL 1.30 or not, but that may not offer any advantages in practice.