diff options
author | Dave Airlie <airlied@redhat.com> | 2018-06-05 16:28:32 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-06-05 16:31:53 +1000 |
commit | 1305da514582eabef4e51bf902e36fdebf268c25 (patch) | |
tree | d7bb3c31bc6d167458f8f44008a571003309026d | |
parent | c28f5711c80d81081cac42d6eab44a7b9bf86a02 (diff) |
convert load dtypeprefix
-rw-r--r-- | src/vrend_shader.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vrend_shader.c b/src/vrend_shader.c index ceb21d4..b1d85fe 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -2257,20 +2257,20 @@ translate_load(struct dump_ctx *ctx, enum tgsi_return_type itype; const char *formatstr = get_internalformat_string(ctx->images[sreg_index].decl.Format, &itype); char ms_str[32] = {}; - const char *dtypeprefix = ""; + enum vrend_type_qualifier dtypeprefix = TYPE_CONVERSION_NONE; if (is_ms) { snprintf(ms_str, 32, ", int(%s.w)", srcs[1]); } switch (itype) { case TGSI_RETURN_TYPE_UINT: - dtypeprefix = "uintBitsToFloat"; + dtypeprefix = UINT_BITS_TO_FLOAT; break; case TGSI_RETURN_TYPE_SINT: - dtypeprefix = "intBitsToFloat"; + dtypeprefix = INT_BITS_TO_FLOAT; break; } if (src->Register.File == TGSI_FILE_IMAGE) - snprintf(buf, 255, "%s = %s(imageLoad(%s, %s(floatBitsToInt(%s))%s));\n", dsts[0], dtypeprefix, srcs[0], coord_prefix, srcs[1], ms_str); + snprintf(buf, 255, "%s = %s(imageLoad(%s, %s(floatBitsToInt(%s))%s));\n", dsts[0], get_string(dtypeprefix), srcs[0], coord_prefix, srcs[1], ms_str); else if (src->Register.File == TGSI_FILE_BUFFER) snprintf(buf, 255, "%s = %s(uintBitsToFloat(%s[int(%s)>>4]));\n", dsts[0], dstconv, srcs[0], srcs[1]); EMIT_BUF_WITH_RET(ctx, buf); |