mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 12:18:09 +02:00
r600/sb: use safe math optimizations when TGSI contains precise operations
Fixes: dEQP-GLES3.functional.shaders.invariance.highp.common_subexpression_3 dEQP-GLES3.functional.shaders.invariance.mediump.common_subexpression_3 dEQP-GLES3.functional.shaders.invariance.lowp.common_subexpression_3 Signed-off-by: Gert Wollny <gw.fossdev@gmail.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
parent
cc3b99bb48
commit
14976817f4
3 changed files with 5 additions and 1 deletions
|
|
@ -277,6 +277,7 @@ struct r600_bytecode {
|
|||
struct r600_bytecode_output pending_outputs[5];
|
||||
int n_pending_outputs;
|
||||
boolean need_wait_ack; /* emit a pending WAIT_ACK prior to control flow */
|
||||
boolean precise;
|
||||
};
|
||||
|
||||
/* eg_asm.c */
|
||||
|
|
|
|||
|
|
@ -3879,6 +3879,9 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
|
|||
ctx.inst_info = &eg_shader_tgsi_instruction[opcode];
|
||||
else
|
||||
ctx.inst_info = &r600_shader_tgsi_instruction[opcode];
|
||||
|
||||
ctx.bc->precise |= ctx.parse.FullToken.FullInstruction.Instruction.Precise;
|
||||
|
||||
r = ctx.inst_info->process(&ctx);
|
||||
if (r)
|
||||
goto out_err;
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ int bc_parser::decode() {
|
|||
}
|
||||
|
||||
sh = new shader(ctx, t, bc->debug_id);
|
||||
sh->safe_math = sb_context::safe_math || (t == TARGET_COMPUTE);
|
||||
sh->safe_math = sb_context::safe_math || (t == TARGET_COMPUTE || bc->precise);
|
||||
|
||||
int r = decode_shader();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue