st/nine: rename *_conversion to *_internal
authorAxel Davy <davyaxel0@gmail.com>
Wed, 10 Apr 2019 20:38:43 +0000 (22:38 +0200)
committerAxel Davy <davyaxel0@gmail.com>
Tue, 30 Apr 2019 17:18:50 +0000 (19:18 +0200)
Rename these variables to a new name which will
fit new usages introduced in later commits.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
src/gallium/state_trackers/nine/surface9.c
src/gallium/state_trackers/nine/surface9.h
src/gallium/state_trackers/nine/volume9.c
src/gallium/state_trackers/nine/volume9.h

index f0bdf6372deed7880cf82e35468453b9cef0c784..3266588e478bcf08a80e8092e64a8fc191bb9f46 100644 (file)
@@ -139,22 +139,22 @@ NineSurface9_ctor( struct NineSurface9 *This,
     }
 
     /* Get true format */
-    This->format_conversion = d3d9_to_pipe_format_checked(This->base.info.screen,
+    This->format_internal = d3d9_to_pipe_format_checked(This->base.info.screen,
                                                          pDesc->Format,
                                                          This->base.info.target,
                                                          This->base.info.nr_samples,
                                                          This->base.info.bind,
                                                          FALSE,
                                                          TRUE);
-    if (This->base.info.format != This->format_conversion) {
-        This->data_conversion = align_calloc(
-            nine_format_get_level_alloc_size(This->format_conversion,
+    if (This->base.info.format != This->format_internal) {
+        This->data_internal = align_calloc(
+            nine_format_get_level_alloc_size(This->format_internal,
                                              pDesc->Width,
                                              pDesc->Height,
                                              0), 32);
-        if (!This->data_conversion)
+        if (!This->data_internal)
             return E_OUTOFMEMORY;
-        This->stride_conversion = nine_format_get_stride(This->format_conversion,
+        This->stride_internal = nine_format_get_stride(This->format_internal,
                                                          pDesc->Width);
     }
 
@@ -225,8 +225,8 @@ NineSurface9_dtor( struct NineSurface9 *This )
     /* Release system memory when we have to manage it (no parent) */
     if (!This->base.base.container && This->data)
         align_free(This->data);
-    if (This->data_conversion)
-        align_free(This->data_conversion);
+    if (This->data_internal)
+        align_free(This->data_internal);
     NineResource9_dtor(&This->base);
 }
 
@@ -481,11 +481,11 @@ NineSurface9_LockRect( struct NineSurface9 *This,
     if (p_atomic_read(&This->pending_uploads_counter))
         nine_csmt_process(This->base.base.device);
 
-    if (This->data_conversion) {
+    if (This->data_internal) {
         /* For now we only have uncompressed formats here */
-        pLockedRect->Pitch = This->stride_conversion;
-        pLockedRect->pBits = This->data_conversion + box.y * This->stride_conversion +
-            util_format_get_stride(This->format_conversion, box.x);
+        pLockedRect->Pitch = This->stride_internal;
+        pLockedRect->pBits = This->data_internal + box.y * This->stride_internal +
+            util_format_get_stride(This->format_internal, box.x);
     } else if (This->data) {
         DBG("returning system memory\n");
         /* ATI1 and ATI2 need special handling, because of d3d9 bug.
@@ -551,14 +551,14 @@ NineSurface9_UnlockRect( struct NineSurface9 *This )
     }
     --This->lock_count;
 
-    if (This->data_conversion) {
+    if (This->data_internal) {
         if (This->data) {
             (void) util_format_translate(This->base.info.format,
                                          This->data, This->stride,
                                          0, 0,
-                                         This->format_conversion,
-                                         This->data_conversion,
-                                         This->stride_conversion,
+                                         This->format_internal,
+                                         This->data_internal,
+                                         This->stride_internal,
                                          0, 0,
                                          This->desc.Width, This->desc.Height);
         } else {
@@ -573,9 +573,9 @@ NineSurface9_UnlockRect( struct NineSurface9 *This )
                                     This->base.resource,
                                     This->level,
                                     &dst_box,
-                                    This->format_conversion,
-                                    This->data_conversion,
-                                    This->stride_conversion,
+                                    This->format_internal,
+                                    This->data_internal,
+                                    This->stride_internal,
                                     0, /* depth = 1 */
                                     &src_box);
         }
@@ -681,10 +681,10 @@ NineSurface9_CopyMemToDefault( struct NineSurface9 *This,
             nine_csmt_process(This->base.base.device);
     }
 
-    if (This->data_conversion)
-        (void) util_format_translate(This->format_conversion,
-                                     This->data_conversion,
-                                     This->stride_conversion,
+    if (This->data_internal)
+        (void) util_format_translate(This->format_internal,
+                                     This->data_internal,
+                                     This->stride_internal,
                                      dst_x, dst_y,
                                      From->base.info.format,
                                      From->data, From->stride,
index 8b8708e29e27e3853a1a6a5c7a8695691766f34f..ee700603bd807f1dccf4c37ac4bb021ca482c6a2 100644 (file)
@@ -47,10 +47,10 @@ struct NineSurface9
     D3DSURFACE_DESC desc;
 
     uint8_t *data; /* system memory backing */
-    uint8_t *data_conversion; /* for conversions */
-    enum pipe_format format_conversion;
+    uint8_t *data_internal; /* for conversions */
+    enum pipe_format format_internal;
     unsigned stride; /* for system memory backing */
-    unsigned stride_conversion;
+    unsigned stride_internal;
 
     unsigned pending_uploads_counter; /* pending uploads */
 };
index f2a2865b0a32074e7c6f47cad04882fb64a8474b..3857124be207599a885340fcb84dc6cd1d00cee4 100644 (file)
@@ -112,21 +112,21 @@ NineVolume9_ctor( struct NineVolume9 *This,
                                                  This->stride, pDesc->Height);
 
     /* Get true format */
-    This->format_conversion = d3d9_to_pipe_format_checked(This->info.screen,
+    This->format_internal = d3d9_to_pipe_format_checked(This->info.screen,
                                                          pDesc->Format,
                                                          This->info.target,
                                                          This->info.nr_samples,
                                                          This->info.bind, FALSE,
                                                          TRUE);
-    if (This->info.format != This->format_conversion) {
-        This->stride_conversion = nine_format_get_stride(This->format_conversion,
+    if (This->info.format != This->format_internal) {
+        This->stride_internal = nine_format_get_stride(This->format_internal,
                                                          pDesc->Width);
-        This->layer_stride_conversion = util_format_get_2d_size(This->format_conversion,
-                                                                This->stride_conversion,
+        This->layer_stride_internal = util_format_get_2d_size(This->format_internal,
+                                                                This->stride_internal,
                                                                 pDesc->Height);
-        This->data_conversion = align_calloc(This->layer_stride_conversion *
+        This->data_internal = align_calloc(This->layer_stride_internal *
                                              This->desc.Depth, 32);
-        if (!This->data_conversion)
+        if (!This->data_internal)
             return E_OUTOFMEMORY;
     }
 
@@ -157,8 +157,8 @@ NineVolume9_dtor( struct NineVolume9 *This )
 
     if (This->data)
         align_free(This->data);
-    if (This->data_conversion)
-        align_free(This->data_conversion);
+    if (This->data_internal)
+        align_free(This->data_internal);
 
     pipe_resource_reference(&This->resource, NULL);
 
@@ -314,13 +314,13 @@ NineVolume9_LockBox( struct NineVolume9 *This,
     if (p_atomic_read(&This->pending_uploads_counter))
         nine_csmt_process(This->base.device);
 
-    if (This->data_conversion) {
+    if (This->data_internal) {
         /* For now we only have uncompressed formats here */
-        pLockedVolume->RowPitch = This->stride_conversion;
-        pLockedVolume->SlicePitch = This->layer_stride_conversion;
-        pLockedVolume->pBits = This->data_conversion + box.z * This->layer_stride_conversion +
-                               box.y * This->stride_conversion +
-                               util_format_get_stride(This->format_conversion, box.x);
+        pLockedVolume->RowPitch = This->stride_internal;
+        pLockedVolume->SlicePitch = This->layer_stride_internal;
+        pLockedVolume->pBits = This->data_internal + box.z * This->layer_stride_internal +
+                               box.y * This->stride_internal +
+                               util_format_get_stride(This->format_internal, box.x);
     } else if (This->data) {
         pLockedVolume->RowPitch = This->stride;
         pLockedVolume->SlicePitch = This->layer_stride;
@@ -371,7 +371,7 @@ NineVolume9_UnlockBox( struct NineVolume9 *This )
     }
     --This->lock_count;
 
-    if (This->data_conversion) {
+    if (This->data_internal) {
         struct pipe_box box;
 
         u_box_3d(0, 0, 0, This->desc.Width, This->desc.Height, This->desc.Depth,
@@ -383,10 +383,10 @@ NineVolume9_UnlockBox( struct NineVolume9 *This )
                                             This->data, This->stride,
                                             This->layer_stride,
                                             0, 0, 0,
-                                            This->format_conversion,
-                                            This->data_conversion,
-                                            This->stride_conversion,
-                                            This->layer_stride_conversion,
+                                            This->format_internal,
+                                            This->data_internal,
+                                            This->stride_internal,
+                                            This->layer_stride_internal,
                                             0, 0, 0,
                                             This->desc.Width, This->desc.Height,
                                             This->desc.Depth);
@@ -397,10 +397,10 @@ NineVolume9_UnlockBox( struct NineVolume9 *This )
                                     This->resource,
                                     This->level,
                                     &box,
-                                    This->format_conversion,
-                                    This->data_conversion,
-                                    This->stride_conversion,
-                                    This->layer_stride_conversion,
+                                    This->format_internal,
+                                    This->data_internal,
+                                    This->stride_internal,
+                                    This->layer_stride_internal,
                                     &box);
         }
     }
@@ -456,11 +456,11 @@ NineVolume9_CopyMemToDefault( struct NineVolume9 *This,
                             From->layer_stride,
                             &src_box);
 
-    if (This->data_conversion)
-        (void) util_format_translate_3d(This->format_conversion,
-                                        This->data_conversion,
-                                        This->stride_conversion,
-                                        This->layer_stride_conversion,
+    if (This->data_internal)
+        (void) util_format_translate_3d(This->format_internal,
+                                        This->data_internal,
+                                        This->stride_internal,
+                                        This->layer_stride_internal,
                                         dstx, dsty, dstz,
                                         From->info.format,
                                         From->data, From->stride,
index e84119f62cfb31f279be7a4ec3adf62ea43fabbe..f438642f56738c5f93090c3cc540a18bb688efff 100644 (file)
@@ -41,15 +41,15 @@ struct NineVolume9
     unsigned level_actual;
 
     uint8_t *data; /* system memory backing */
-    uint8_t *data_conversion; /* for conversions */
+    uint8_t *data_internal; /* for conversions */
 
     D3DVOLUME_DESC desc;
     struct pipe_resource info;
-    enum pipe_format format_conversion;
+    enum pipe_format format_internal;
     unsigned stride;
-    unsigned stride_conversion;
+    unsigned stride_internal;
     unsigned layer_stride;
-    unsigned layer_stride_conversion;
+    unsigned layer_stride_internal;
 
     struct pipe_transfer *transfer;
     unsigned lock_count;