diff options
author | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2021-04-06 18:52:19 +0200 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-04-30 12:02:04 +0000 |
commit | 404521529ce58ea48d102f32895b4f6c086a5d47 (patch) | |
tree | 2e65112bbcb285b60356906f9f0f6d08c27796cc | |
parent | 0b45dbea13f88fa52b818fe832edb392c1e6d3d8 (diff) |
zink: enable 16-bit int support
The mysterious support_16bit_int_alu-option doesn't really mean what it
says. Instead it means "we support 16 bit compares, if 16 bit ALU
operations occur". And since 16 bit operations only appear if we're
lowering mediump/lowp, we can always set this option.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>
-rw-r--r-- | src/gallium/drivers/zink/zink_compiler.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/zink/zink_screen.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c index 03ba0b08e1a..ce6e3a7266f 100644 --- a/src/gallium/drivers/zink/zink_compiler.c +++ b/src/gallium/drivers/zink/zink_compiler.c @@ -391,6 +391,7 @@ zink_screen_init_compiler(struct zink_screen *screen) .has_fsub = true, .has_isub = true, .lower_mul_2x32_64 = true, + .support_16bit_alu = true, /* not quite what it sounds like */ }; screen->nir_options = default_options; diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 5c00b5430f5..1f654eea5f3 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -700,10 +700,12 @@ zink_get_shader_param(struct pipe_screen *pscreen, case PIPE_SHADER_CAP_FP16: case PIPE_SHADER_CAP_FP16_DERIVATIVES: case PIPE_SHADER_CAP_FP16_CONST_BUFFERS: - case PIPE_SHADER_CAP_INT16: case PIPE_SHADER_CAP_GLSL_16BIT_CONSTS: return 0; /* not implemented */ + case PIPE_SHADER_CAP_INT16: + return screen->info.feats.features.shaderInt16; + case PIPE_SHADER_CAP_PREFERRED_IR: return PIPE_SHADER_IR_NIR; |