summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2019-04-10 22:38:43 +0200
committerAxel Davy <[email protected]>2019-04-30 19:18:50 +0200
commit8ba4f73911a80f1dd377e5041d90e8da72d61478 (patch)
treecaf5fbca1a73043446fd4806c2d69e334d76bf62
parent4a51a7c1da54e853dbd59d1ae714d0acf14f3593 (diff)
st/nine: rename *_conversion to *_internal
Rename these variables to a new name which will fit new usages introduced in later commits. Signed-off-by: Axel Davy <[email protected]>
-rw-r--r--src/gallium/state_trackers/nine/surface9.c46
-rw-r--r--src/gallium/state_trackers/nine/surface9.h6
-rw-r--r--src/gallium/state_trackers/nine/volume9.c58
-rw-r--r--src/gallium/state_trackers/nine/volume9.h8
4 files changed, 59 insertions, 59 deletions
diff --git a/src/gallium/state_trackers/nine/surface9.c b/src/gallium/state_trackers/nine/surface9.c
index f0bdf6372de..3266588e478 100644
--- a/src/gallium/state_trackers/nine/surface9.c
+++ b/src/gallium/state_trackers/nine/surface9.c
@@ -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,
diff --git a/src/gallium/state_trackers/nine/surface9.h b/src/gallium/state_trackers/nine/surface9.h
index 8b8708e29e2..ee700603bd8 100644
--- a/src/gallium/state_trackers/nine/surface9.h
+++ b/src/gallium/state_trackers/nine/surface9.h
@@ -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 */
};
diff --git a/src/gallium/state_trackers/nine/volume9.c b/src/gallium/state_trackers/nine/volume9.c
index f2a2865b0a3..3857124be20 100644
--- a/src/gallium/state_trackers/nine/volume9.c
+++ b/src/gallium/state_trackers/nine/volume9.c
@@ -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,
diff --git a/src/gallium/state_trackers/nine/volume9.h b/src/gallium/state_trackers/nine/volume9.h
index e84119f62cf..f438642f567 100644
--- a/src/gallium/state_trackers/nine/volume9.h
+++ b/src/gallium/state_trackers/nine/volume9.h
@@ -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;