Mesa (master): mesa: don't handle STATE_* enums in fetch_state that don't do anything

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 21 22:16:31 UTC 2021


Module: Mesa
Branch: master
Commit: 72a1828868bb3a9eab61f7af7a0abd8a9d723ce3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=72a1828868bb3a9eab61f7af7a0abd8a9d723ce3

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sat Dec 12 13:19:39 2020 -0500

mesa: don't handle STATE_* enums in fetch_state that don't do anything

_mesa_program_state_flags() already reports invalid state flags. fetch_state is
always called after that.

Reviewed-by: Zoltán Böszörményi <zboszor at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>

---

 src/mesa/program/prog_statevars.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c
index eb48a5e8a3c..43d84ad0d37 100644
--- a/src/mesa/program/prog_statevars.c
+++ b/src/mesa/program/prog_statevars.c
@@ -665,20 +665,6 @@ fetch_state(struct gl_context *ctx, const gl_state_index16 state[],
          COPY_4V(value, ctx->Transform._ClipUserPlane[plane]);
       }
       return;
-
-   case STATE_INTERNAL_DRIVER:
-      /* Internal driver state */
-      return;
-
-   case STATE_NOT_STATE_VAR:
-      /* Most likely PROGRAM_CONSTANT. This only happens in rare cases, e.g.
-       * ARB_vp with ARL, which can't sort parameters by type.
-       */
-      return;
-
-   default:
-      unreachable("Invalid state in _mesa_fetch_state");
-      return;
    }
 }
 



More information about the mesa-commit mailing list