aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-12-04 15:03:15 -0800
committerEric Anholt <[email protected]>2018-12-07 16:48:23 -0800
commitbad95bb13c7f857df0d9767040dd28d4187715c2 (patch)
tree3becf7a7d052327dd47807c73b14654312de5d32 /src/gallium/drivers
parent1fc78ff3f1774d6c58f78e184f01b123cf854284 (diff)
v3d: Add VIR dumping of TMU config p0/p1.
I had a bit of it for V3D 3.x, but didn't update it for 4.x.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/v3d/v3d_uniforms.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/gallium/drivers/v3d/v3d_uniforms.c b/src/gallium/drivers/v3d/v3d_uniforms.c
index 6d927deeec5..49e83ccdb1d 100644
--- a/src/gallium/drivers/v3d/v3d_uniforms.c
+++ b/src/gallium/drivers/v3d/v3d_uniforms.c
@@ -148,17 +148,13 @@ write_tmu_p0(struct v3d_job *job,
struct v3d_texture_stateobj *texstate,
uint32_t data)
{
- /* Extract the texture unit from the top bits, and the compiler's
- * packed p0 from the bottom.
- */
- uint32_t unit = data >> 24;
- uint32_t p0 = data & 0x00ffffff;
-
+ int unit = v3d_tmu_config_data_get_unit(data);
struct pipe_sampler_view *psview = texstate->textures[unit];
struct v3d_sampler_view *sview = v3d_sampler_view(psview);
struct v3d_resource *rsc = v3d_resource(psview->texture);
- cl_aligned_reloc(&job->indirect, uniforms, sview->bo, p0);
+ cl_aligned_reloc(&job->indirect, uniforms, sview->bo,
+ v3d_tmu_config_data_get_value(data));
v3d_job_add_bo(job, rsc->bo);
}
@@ -169,16 +165,12 @@ write_tmu_p1(struct v3d_job *job,
struct v3d_texture_stateobj *texstate,
uint32_t data)
{
- /* Extract the texture unit from the top bits, and the compiler's
- * packed p1 from the bottom.
- */
- uint32_t unit = data >> 24;
- uint32_t p0 = data & 0x00ffffff;
-
+ uint32_t unit = v3d_tmu_config_data_get_unit(data);
struct pipe_sampler_state *psampler = texstate->samplers[unit];
struct v3d_sampler_state *sampler = v3d_sampler_state(psampler);
- cl_aligned_reloc(&job->indirect, uniforms, sampler->bo, p0);
+ cl_aligned_reloc(&job->indirect, uniforms, sampler->bo,
+ v3d_tmu_config_data_get_value(data));
}
struct v3d_cl_reloc