r300g: remove unused r300_resource::tex_offset
authorMarek Olšák <maraeo@gmail.com>
Fri, 7 Oct 2011 23:06:36 +0000 (01:06 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sat, 8 Oct 2011 00:21:24 +0000 (02:21 +0200)
src/gallium/drivers/r300/r300_blit.c
src/gallium/drivers/r300/r300_context.h
src/gallium/drivers/r300/r300_state_derived.c
src/gallium/drivers/r300/r300_texture.c
src/gallium/drivers/r300/r300_texture.h

index 3c1b3648a24e91ea5d190ded3c7c568a1baa4ec6..f0743d503d0a1fc19333a24d70db5ed318f4681c 100644 (file)
@@ -545,17 +545,17 @@ static void r300_resource_copy_region(struct pipe_context *pipe,
     }
 
     if (old_src.format != new_src.format)
-        r300_resource_set_properties(pipe->screen, src, 0, &new_src);
+        r300_resource_set_properties(pipe->screen, src, &new_src);
     if (old_dst.format != new_dst.format)
-        r300_resource_set_properties(pipe->screen, dst, 0, &new_dst);
+        r300_resource_set_properties(pipe->screen, dst, &new_dst);
 
     r300_hw_copy_region(pipe, dst, dst_level, dstx, dsty, dstz,
                         src, src_level, src_box);
 
     if (old_src.format != new_src.format)
-        r300_resource_set_properties(pipe->screen, src, 0, &old_src);
+        r300_resource_set_properties(pipe->screen, src, &old_src);
     if (old_dst.format != new_dst.format)
-        r300_resource_set_properties(pipe->screen, dst, 0, &old_dst);
+        r300_resource_set_properties(pipe->screen, dst, &old_dst);
 }
 
 void r300_init_blit_functions(struct r300_context *r300)
index d8638fc1764e82aed007da550b951ca0f60c9e3b..b89d6ecce173765bd915719ec1190b66b82c5d82 100644 (file)
@@ -402,9 +402,6 @@ struct r300_resource
     /* Only format-independent bits should be filled in. */
     struct r300_texture_format_state tx_format;
 
-    /* Where the texture starts in the buffer. */
-    unsigned tex_offset;
-
     /* This is the level tiling flags were last time set for.
      * It's used to prevent redundant tiling-flags changes from happening.*/
     unsigned surface_level;
index daeb4d716d079773c195cf6b82296a127c5042ac..9ba6397084a1d1bc4dfb39c6af351a979155ab84 100644 (file)
@@ -782,17 +782,13 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
                      * an i-th mipmap level as the zero level. */
                     base_level += min_level;
                 }
-                offset = tex->tex_offset +
-                         tex->tex.offset_in_bytes[base_level];
+                offset = tex->tex.offset_in_bytes[base_level];
 
                 r300_texture_setup_format_state(r300->screen, tex,
                                                 base_level,
                                                 &texstate->format);
                 texstate->format.tile_config |= offset & 0xffffffe0;
                 assert((offset & 0x1f) == 0);
-            } else {
-                texstate->format.tile_config |= tex->tex_offset & 0xffffffe0;
-                assert((tex->tex_offset & 0x1f) == 0);
             }
 
             /* Assign a texture cache region. */
index 11442864c71175e62befaa93404dc18eecb5419f..864dbc2e7bb6490733338eba5ab72766220730ab 100644 (file)
@@ -814,7 +814,6 @@ static void r300_texture_setup_fb_state(struct r300_surface *surf)
 
 boolean r300_resource_set_properties(struct pipe_screen *screen,
                                      struct pipe_resource *tex,
-                                     unsigned offset,
                                      const struct pipe_resource *new_properties)
 {
     struct r300_screen *rscreen = r300_screen(screen);
@@ -829,7 +828,6 @@ boolean r300_resource_set_properties(struct pipe_screen *screen,
         fprintf(stderr, "r300: ERROR: Cannot set texture properties.\n");
         return FALSE;
     }
-    res->tex_offset = offset;
     r300_texture_setup_format_state(rscreen, res, 0, &res->tx_format);
 
     return TRUE;
@@ -899,7 +897,7 @@ r300_texture_create_object(struct r300_screen *rscreen,
     tex->tex.stride_in_bytes_override = stride_in_bytes_override;
     tex->buf = buffer;
 
-    if (!r300_resource_set_properties(&rscreen->screen, &tex->b.b.b, 0, base)) {
+    if (!r300_resource_set_properties(&rscreen->screen, &tex->b.b.b, base)) {
         if (buffer)
             pb_reference(&buffer, NULL);
         FREE(tex);
index 158a387478ff377379174b8f64f75dd7f5a2d34d..0da07235a69f122bd1a60176cf2306b405a2d986 100644 (file)
@@ -48,7 +48,6 @@ uint32_t r500_tx_format_msb_bit(enum pipe_format format);
 
 boolean r300_resource_set_properties(struct pipe_screen *screen,
                                      struct pipe_resource *tex,
-                                     unsigned offset,
                                      const struct pipe_resource *new_properties);
 
 boolean r300_is_colorbuffer_format_supported(enum pipe_format format);