aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2020-01-21 17:39:03 -0800
committerMarge Bot <[email protected]>2020-02-05 22:25:59 +0000
commitf4f769c851f4130195b5e3b76784df93f457d571 (patch)
tree2c4f6856cf0d5365bf362e2121197b14a3a7a9d9 /src/gallium/drivers/nouveau
parentf9358f6f765092c821696df8b36bf2cf70b05e49 (diff)
nouveau: reuse tgsi_get_gl_frag_result_semantic().
Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Tested-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3506>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp31
1 files changed, 1 insertions, 30 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
index 0470e02a4a8..0355cedca63 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
@@ -983,35 +983,6 @@ varying_slot_to_tgsi_semantic(gl_varying_slot slot, unsigned *name, unsigned *in
}
}
-static void
-frag_result_to_tgsi_semantic(unsigned slot, unsigned *name, unsigned *index)
-{
- if (slot >= FRAG_RESULT_DATA0) {
- *name = TGSI_SEMANTIC_COLOR;
- *index = slot - FRAG_RESULT_COLOR - 2; // intentional
- return;
- }
-
- switch (slot) {
- case FRAG_RESULT_COLOR:
- *name = TGSI_SEMANTIC_COLOR;
- *index = 0;
- break;
- case FRAG_RESULT_DEPTH:
- *name = TGSI_SEMANTIC_POSITION;
- *index = 0;
- break;
- case FRAG_RESULT_SAMPLE_MASK:
- *name = TGSI_SEMANTIC_SAMPLEMASK;
- *index = 0;
- break;
- default:
- ERROR("unknown frag result slot %u\n", slot);
- assert(false);
- break;
- }
-}
-
void
Converter::setInterpolate(nv50_ir_varying *var,
uint8_t mode,
@@ -1197,7 +1168,7 @@ bool Converter::assignSlots() {
switch(prog->getType()) {
case Program::TYPE_FRAGMENT:
- frag_result_to_tgsi_semantic((gl_frag_result)slot, &name, &index);
+ tgsi_get_gl_frag_result_semantic((gl_frag_result)slot, &name, &index);
switch (name) {
case TGSI_SEMANTIC_COLOR:
if (!var->data.fb_fetch_output)