summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-10-02 14:01:29 -0700
committerEric Anholt <[email protected]>2014-10-02 18:28:45 -0700
commit24d998056275f4fab9bf3e98c962d91245ef1b7b (patch)
tree3930f42c2853390c7b849e1d9a2a799eff1a3725 /src/gallium/drivers/vc4/vc4_qir.h
parent3dd9a0d6fdea1ff5b1fe903fce206bf1d1515400 (diff)
vc4: Add support for sampling from sRGB.
This isn't perfect -- the filtering is happening on the srgb values, and we're decoding afterwards, which is not what you want. I think that's the cause of some additional texwrap(GL_CLAMP, LINEAR) failures, though many other texwrap tests on srgb start to pass since unfiltered values come out correct.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.h b/src/gallium/drivers/vc4/vc4_qir.h
index 3d8caeb8a29..67355bb05a4 100644
--- a/src/gallium/drivers/vc4/vc4_qir.h
+++ b/src/gallium/drivers/vc4/vc4_qir.h
@@ -410,4 +410,12 @@ qir_UNPACK_8(struct vc4_compile *c, struct qreg src, int i)
return t;
}
+static inline struct qreg
+qir_POW(struct vc4_compile *c, struct qreg x, struct qreg y)
+{
+ return qir_EXP2(c, qir_FMUL(c,
+ y,
+ qir_LOG2(c, x)));
+}
+
#endif /* VC4_QIR_H */