diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-03-11 05:16:58 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-03-11 05:16:58 +0000 |
commit | 723ba5de8b822a003cb8ceb8bc2449cbb682ff65 (patch) | |
tree | 7545f9040e5e70ec476f1108ab5e04747cdca97a /lib | |
parent | b87befe14c653861830ec0bfa9b8a27e503a2294 (diff) |
ac: set new LLVM denormal flags
From Marek Olsak
63a5051ea6bf4d72a02594d21a3351e44bd70da7 in mainline Mesa
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mesa/src/amd/llvm/ac_llvm_build.c | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/lib/mesa/src/amd/llvm/ac_llvm_build.c b/lib/mesa/src/amd/llvm/ac_llvm_build.c index edbedfb9a..d76c69800 100644 --- a/lib/mesa/src/amd/llvm/ac_llvm_build.c +++ b/lib/mesa/src/amd/llvm/ac_llvm_build.c @@ -703,11 +703,6 @@ ac_build_fdiv(struct ac_llvm_context *ctx, unsigned type_size = ac_get_type_size(LLVMTypeOf(den)); const char *name; - /* For doubles, we need precise division to pass GLCTS. */ - if (ctx->float_mode == AC_FLOAT_MODE_DEFAULT_OPENGL && - type_size == 8) - return LLVMBuildFDiv(ctx->builder, num, den, ""); - if (type_size == 2) name = "llvm.amdgcn.rcp.f16"; else if (type_size == 4) @@ -4710,24 +4705,6 @@ ac_build_load_helper_invocation(struct ac_llvm_context *ctx) return LLVMBuildSExt(ctx->builder, result, ctx->i32, ""); } -LLVMValueRef -ac_build_is_helper_invocation(struct ac_llvm_context *ctx) -{ - if (!ctx->postponed_kill) - return ac_build_load_helper_invocation(ctx); - - /* !(exact && postponed) */ - LLVMValueRef exact = ac_build_intrinsic(ctx, "llvm.amdgcn.ps.live", - ctx->i1, NULL, 0, - AC_FUNC_ATTR_READNONE); - - LLVMValueRef postponed = LLVMBuildLoad(ctx->builder, ctx->postponed_kill, ""); - LLVMValueRef result = LLVMBuildAnd(ctx->builder, exact, postponed, ""); - - return LLVMBuildSelect(ctx->builder, result, ctx->i32_0, - LLVMConstInt(ctx->i32, 0xFFFFFFFF, false), ""); -} - LLVMValueRef ac_build_call(struct ac_llvm_context *ctx, LLVMValueRef func, LLVMValueRef *args, unsigned num_args) { @@ -4821,7 +4798,10 @@ void ac_build_sendmsg_gs_alloc_req(struct ac_llvm_context *ctx, LLVMValueRef wav * We always have to export at least 1 primitive. * Export a degenerate triangle using vertex 0 for all 3 vertices. */ - if (prim_cnt == ctx->i32_0 && ctx->chip_class == GFX10) { + if (prim_cnt == ctx->i32_0 && + (ctx->family == CHIP_NAVI10 || + ctx->family == CHIP_NAVI12 || + ctx->family == CHIP_NAVI14)) { assert(vtx_cnt == ctx->i32_0); prim_cnt = ctx->i32_1; vtx_cnt = ctx->i32_1; |