rsx: Drop hard requirement for GL_EXT_shader_integer_mix

This commit is contained in:
kd-11 2024-06-07 02:54:24 +03:00 committed by kd-11
parent 32a5641ace
commit e966289ddb
2 changed files with 3 additions and 5 deletions

View file

@ -31,8 +31,6 @@ void GLFragmentDecompilerThread::insertHeader(std::stringstream & OS)
int gl_version = 430;
std::vector<std::string> required_extensions;
required_extensions.push_back("GL_EXT_shader_integer_mix");
if (device_props.has_native_half_support)
{
const auto driver_caps = gl::get_driver_caps();

View file

@ -172,9 +172,9 @@ vec4 _texcoord_xform_shadow(const in vec4 coord4, const in sampler_info params)
vec4 _sext_unorm8x4(const in vec4 x)
{
// TODO: Handle clamped sign-extension
const ivec4 bits = ivec4(floor(fma(x, vec4(255.), vec4(0.5f))));
const bvec4 sign_check = lessThan(bits, ivec4(0x80));
const ivec4 ret = _select(bits - 256, bits, sign_check);
const vec4 bits = floor(fma(x, vec4(255.), vec4(0.5f)));
const bvec4 sign_check = lessThan(bits, vec4(128.f));
const vec4 ret = _select(bits - 256.f, bits, sign_check);
return ret / 127.f;
}