gallivm: move first/last level jit texture members.
authorDave Airlie <airlied@redhat.com>
Fri, 19 Jul 2019 05:04:55 +0000 (15:04 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 27 Aug 2019 02:29:31 +0000 (12:29 +1000)
This lets us create an image structure with the same basic
types as the texture one.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/auxiliary/draw/draw_llvm.h
src/gallium/drivers/llvmpipe/lp_jit.c
src/gallium/drivers/llvmpipe/lp_jit.h

index d4c89a851461823dbae5be20e9a2a05a9be2b0da..2bc924b69393da315ee6aad6e253d1d9358e493c 100644 (file)
@@ -145,12 +145,6 @@ create_jit_texture_type(struct gallivm_state *gallivm, const char *struct_name)
    LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, depth,
                           target, texture_type,
                           DRAW_JIT_TEXTURE_DEPTH);
-   LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, first_level,
-                          target, texture_type,
-                          DRAW_JIT_TEXTURE_FIRST_LEVEL);
-   LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, last_level,
-                          target, texture_type,
-                          DRAW_JIT_TEXTURE_LAST_LEVEL);
    LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, base,
                           target, texture_type,
                           DRAW_JIT_TEXTURE_BASE);
@@ -160,6 +154,12 @@ create_jit_texture_type(struct gallivm_state *gallivm, const char *struct_name)
    LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, img_stride,
                           target, texture_type,
                           DRAW_JIT_TEXTURE_IMG_STRIDE);
+   LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, first_level,
+                          target, texture_type,
+                          DRAW_JIT_TEXTURE_FIRST_LEVEL);
+   LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, last_level,
+                          target, texture_type,
+                          DRAW_JIT_TEXTURE_LAST_LEVEL);
    LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, mip_offsets,
                           target, texture_type,
                           DRAW_JIT_TEXTURE_MIP_OFFSETS);
index 1556ea5c7ac53e28c50dd1e9caee2832ccf57e72..26ca32ff8d29c2d56d0a3efd8d1b723d9f1ac203 100644 (file)
@@ -49,11 +49,11 @@ struct draw_jit_texture
    uint32_t width;
    uint32_t height;
    uint32_t depth;
-   uint32_t first_level;
-   uint32_t last_level;
    const void *base;
    uint32_t row_stride[PIPE_MAX_TEXTURE_LEVELS];
    uint32_t img_stride[PIPE_MAX_TEXTURE_LEVELS];
+   uint32_t first_level;
+   uint32_t last_level;
    uint32_t mip_offsets[PIPE_MAX_TEXTURE_LEVELS];
 };
 
@@ -83,11 +83,11 @@ enum {
    DRAW_JIT_TEXTURE_WIDTH = 0,
    DRAW_JIT_TEXTURE_HEIGHT,
    DRAW_JIT_TEXTURE_DEPTH,
-   DRAW_JIT_TEXTURE_FIRST_LEVEL,
-   DRAW_JIT_TEXTURE_LAST_LEVEL,
    DRAW_JIT_TEXTURE_BASE,
    DRAW_JIT_TEXTURE_ROW_STRIDE,
    DRAW_JIT_TEXTURE_IMG_STRIDE,
+   DRAW_JIT_TEXTURE_FIRST_LEVEL,
+   DRAW_JIT_TEXTURE_LAST_LEVEL,
    DRAW_JIT_TEXTURE_MIP_OFFSETS,
    DRAW_JIT_TEXTURE_NUM_FIELDS  /* number of fields above */
 };
index de21abf212a2b8351fb06ab984deb0f591ab64ed..6270340ef617e18a788dc3a55a20d67568c0a404 100644 (file)
@@ -71,12 +71,6 @@ create_jit_texture_type(struct gallivm_state *gallivm)
    LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, depth,
                           gallivm->target, texture_type,
                           LP_JIT_TEXTURE_DEPTH);
-   LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, first_level,
-                          gallivm->target, texture_type,
-                          LP_JIT_TEXTURE_FIRST_LEVEL);
-   LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, last_level,
-                          gallivm->target, texture_type,
-                          LP_JIT_TEXTURE_LAST_LEVEL);
    LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, base,
                           gallivm->target, texture_type,
                           LP_JIT_TEXTURE_BASE);
@@ -86,6 +80,12 @@ create_jit_texture_type(struct gallivm_state *gallivm)
    LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, img_stride,
                           gallivm->target, texture_type,
                           LP_JIT_TEXTURE_IMG_STRIDE);
+   LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, first_level,
+                          gallivm->target, texture_type,
+                          LP_JIT_TEXTURE_FIRST_LEVEL);
+   LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, last_level,
+                          gallivm->target, texture_type,
+                          LP_JIT_TEXTURE_LAST_LEVEL);
    LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, mip_offsets,
                           gallivm->target, texture_type,
                           LP_JIT_TEXTURE_MIP_OFFSETS);
index 6dc3147df2a4c55c0bd2d5d873359a3900d6edb6..7868cf4eefa84fd465a6c091262fda33f0f70e49 100644 (file)
@@ -53,11 +53,11 @@ struct lp_jit_texture
    uint32_t width;        /* same as number of elements */
    uint32_t height;
    uint32_t depth;        /* doubles as array size */
-   uint32_t first_level;
-   uint32_t last_level;
    const void *base;
    uint32_t row_stride[LP_MAX_TEXTURE_LEVELS];
    uint32_t img_stride[LP_MAX_TEXTURE_LEVELS];
+   uint32_t first_level;
+   uint32_t last_level;
    uint32_t mip_offsets[LP_MAX_TEXTURE_LEVELS];
 };
 
@@ -82,11 +82,11 @@ enum {
    LP_JIT_TEXTURE_WIDTH = 0,
    LP_JIT_TEXTURE_HEIGHT,
    LP_JIT_TEXTURE_DEPTH,
-   LP_JIT_TEXTURE_FIRST_LEVEL,
-   LP_JIT_TEXTURE_LAST_LEVEL,
    LP_JIT_TEXTURE_BASE,
    LP_JIT_TEXTURE_ROW_STRIDE,
    LP_JIT_TEXTURE_IMG_STRIDE,
+   LP_JIT_TEXTURE_FIRST_LEVEL,
+   LP_JIT_TEXTURE_LAST_LEVEL,
    LP_JIT_TEXTURE_MIP_OFFSETS,
    LP_JIT_TEXTURE_NUM_FIELDS  /* number of fields above */
 };