[virglrenderer-devel] [PATCH 1/2] use short-hand state accessors

Erik Faye-Lund erik.faye-lund at collabora.com
Tue Jul 17 07:44:54 UTC 2018


We already set up a short-hand accessor for vstate->base, so let's
use that for somewhat cleaner code.

Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
---
 src/vrend_renderer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 69f1da3..afb291d 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -4181,7 +4181,7 @@ static void vrend_apply_sampler_state(struct vrend_context *ctx,
    if (vrend_state.have_samplers) {
       if (vrend_format_is_emulated_alpha(res->base.format)) {
          union pipe_color_union border_color;
-         border_color = vstate->base.border_color;
+         border_color = state->border_color;
          border_color.ui[0] = border_color.ui[3];
          border_color.ui[3] = 0;
          glSamplerParameterIuiv(vstate->id, GL_TEXTURE_BORDER_COLOR, border_color.ui);
@@ -4246,7 +4246,7 @@ static void vrend_apply_sampler_state(struct vrend_context *ctx,
        is_emulated_alpha) {
       if (is_emulated_alpha) {
          union pipe_color_union border_color;
-         border_color = vstate->base.border_color;
+         border_color = state->border_color;
          border_color.ui[0] = border_color.ui[3];
          border_color.ui[3] = 0;
          glTexParameterIuiv(target, GL_TEXTURE_BORDER_COLOR, border_color.ui);
-- 
2.18.0.rc2



More information about the virglrenderer-devel mailing list