QUNIFORM_SHARED_OFFSET,
};
-static inline uint32_t v3d_tmu_config_data_create(uint32_t unit, uint32_t value)
+static inline uint32_t v3d_unit_data_create(uint32_t unit, uint32_t value)
{
return unit << 24 | value;
}
-static inline uint32_t v3d_tmu_config_data_get_unit(uint32_t data)
+static inline uint32_t v3d_unit_data_get_unit(uint32_t data)
{
return data >> 24;
}
-static inline uint32_t v3d_tmu_config_data_get_value(uint32_t data)
+static inline uint32_t v3d_unit_data_get_offset(uint32_t data)
{
return data & 0xffffff;
}
case QUNIFORM_TMU_CONFIG_P0:
fprintf(stderr, "tex[%d].p0 | 0x%x",
- v3d_tmu_config_data_get_unit(data),
- v3d_tmu_config_data_get_value(data));
+ v3d_unit_data_get_unit(data),
+ v3d_unit_data_get_offset(data));
break;
case QUNIFORM_TMU_CONFIG_P1:
fprintf(stderr, "tex[%d].p1 | 0x%x",
- v3d_tmu_config_data_get_unit(data),
- v3d_tmu_config_data_get_value(data));
+ v3d_unit_data_get_unit(data),
+ v3d_unit_data_get_offset(data));
break;
case QUNIFORM_IMAGE_TMU_CONFIG_P0:
fprintf(stderr, "img[%d].p0 | 0x%x",
- v3d_tmu_config_data_get_unit(data),
- v3d_tmu_config_data_get_value(data));
+ v3d_unit_data_get_unit(data),
+ v3d_unit_data_get_offset(data));
break;
case QUNIFORM_TEXTURE_WIDTH:
struct v3d_texture_stateobj *texstate,
uint32_t data)
{
- int unit = v3d_tmu_config_data_get_unit(data);
+ int unit = v3d_unit_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(sview->texture);
cl_aligned_reloc(&job->indirect, uniforms, sview->bo,
- v3d_tmu_config_data_get_value(data));
+ v3d_unit_data_get_offset(data));
v3d_job_add_bo(job, rsc->bo);
}
struct v3d_texture_stateobj *texstate,
uint32_t data)
{
- uint32_t unit = v3d_tmu_config_data_get_unit(data);
+ uint32_t unit = v3d_unit_data_get_unit(data);
struct pipe_sampler_state *psampler = texstate->samplers[unit];
struct v3d_sampler_state *sampler = v3d_sampler_state(psampler);
struct pipe_sampler_view *psview = texstate->textures[unit];
cl_aligned_reloc(&job->indirect, uniforms,
v3d_resource(sampler->sampler_state)->bo,
sampler->sampler_state_offset[variant] |
- v3d_tmu_config_data_get_value(data));
+ v3d_unit_data_get_offset(data));
}
struct v3d_cl_reloc