Mesa (gallium-array-textures): gallium: rename element_offset/ width fields in views to first/last_element

Roland Scheidegger sroland at kemper.freedesktop.org
Fri Jun 18 07:24:04 PDT 2010


Module: Mesa
Branch: gallium-array-textures
Commit: 17492d705e7b7f607b71db045c3bf344cb6842b3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=17492d705e7b7f607b71db045c3bf344cb6842b3

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Fri Jun 18 10:58:08 2010 +0100

gallium: rename element_offset/width fields in views to first/last_element

This is much more consistent with the other fields used there
(first/last level, first/last layer).
Actually thinking about removing the ugly union/structs again and
rename first/last_layer to something even more generic which could also
be used for buffers (like first/last_member) without inducing headaches.

---

 src/gallium/drivers/trace/tr_dump_state.c |    8 ++++----
 src/gallium/include/pipe/p_state.h        |    8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/gallium/drivers/trace/tr_dump_state.c b/src/gallium/drivers/trace/tr_dump_state.c
index 296b760..746f953 100644
--- a/src/gallium/drivers/trace/tr_dump_state.c
+++ b/src/gallium/drivers/trace/tr_dump_state.c
@@ -435,8 +435,8 @@ void trace_dump_sampler_view_template(const struct pipe_sampler_view *state)
    trace_dump_member(uint, state, u.tex.last_level);
    trace_dump_member(uint, state, u.tex.first_layer);
    trace_dump_member(uint, state, u.tex.last_layer);
-   trace_dump_member(uint, state, u.buf.element_offset);
-   trace_dump_member(uint, state, u.buf.element_width);
+   trace_dump_member(uint, state, u.buf.first_element);
+   trace_dump_member(uint, state, u.buf.last_element);
    trace_dump_member(uint, state, swizzle_r);
    trace_dump_member(uint, state, swizzle_g);
    trace_dump_member(uint, state, swizzle_b);
@@ -468,8 +468,8 @@ void trace_dump_surface(const struct pipe_surface *state)
    trace_dump_member(uint, state, u.tex.level);
    trace_dump_member(uint, state, u.tex.first_layer);
    trace_dump_member(uint, state, u.tex.last_layer);
-   trace_dump_member(uint, state, u.buf.element_offset);
-   trace_dump_member(uint, state, u.buf.element_width);
+   trace_dump_member(uint, state, u.buf.first_element);
+   trace_dump_member(uint, state, u.buf.last_element);
 
    trace_dump_struct_end();
 }
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index aa82113..6bbc829 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -294,8 +294,8 @@ struct pipe_surface
          unsigned last_layer:16;
       } tex;
       struct {
-         unsigned element_offset;
-         unsigned element_width;
+         unsigned first_element;
+         unsigned last_element;
       } buf;
    } u;
 };
@@ -318,8 +318,8 @@ struct pipe_sampler_view
          unsigned last_level:8;       /**< last mipmap level to use */
       } tex;
       struct {
-         unsigned element_offset;
-         unsigned element_width;
+         unsigned first_element;
+         unsigned last_element;
       } buf;
    } u;
    unsigned swizzle_r:3;         /**< PIPE_SWIZZLE_x for red component */



More information about the mesa-commit mailing list