[Mesa-dev] [PATCH 4/9] anv/gen8_pipeline: Use Alternate floating point mode when use_alt_mode is set in prog_data
Kenneth Graunke
kenneth at whitecape.org
Sun Oct 2 20:59:44 UTC 2016
On Friday, September 30, 2016 3:33:12 PM PDT Anuj Phogat wrote:
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
> src/intel/vulkan/gen8_pipeline.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/intel/vulkan/gen8_pipeline.c b/src/intel/vulkan/gen8_pipeline.c
> index 1abb97c..7a9a3cf 100644
> --- a/src/intel/vulkan/gen8_pipeline.c
> +++ b/src/intel/vulkan/gen8_pipeline.c
> @@ -197,7 +197,8 @@ genX(graphics_pipeline_create)(
> vs_prog_data->base.base.binding_table.size_bytes / 4;
>
> vs.ThreadDispatchPriority = false;
> - vs.FloatingPointMode = IEEE754;
> + vs.FloatingPointMode = vs_prog_data->base.base.use_alt_mode ?
> + Alternate : IEEE754;
> vs.IllegalOpcodeExceptionEnable = false;
> vs.AccessesUAV = false;
> vs.SoftwareExceptionEnable = false;
>
I don't think we need this. The only reason we use ALT mode is to make
the POW opcode match the ARB_fragment_program rules for 0^0. Otherwise,
we always use IEEE-754. We should always use IEEE for SPIR-V programs.
So, adding the condition just adds a tiny bit of CPU overhead.
How about we instead do:
assert(!vs_prog_data->base.base.use_alt_mode);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161002/e76a0306/attachment.sig>
More information about the mesa-dev
mailing list