[Mesa-dev] [PATCH 4/9] anv/gen8_pipeline: Use Alternate floating point mode when use_alt_mode is set in prog_data
Anuj Phogat
anuj.phogat at gmail.com
Mon Oct 3 16:40:45 UTC 2016
On Sun, Oct 2, 2016 at 1:59 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> 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);
This sounds good to me.
More information about the mesa-dev
mailing list