* parameter if the output is 32 bit
*/
bool output_type_32_bit =
- c->key->sampler[sampler_idx].return_size == 32 &&
- !instr->is_shadow;
+ c->key->sampler[sampler_idx].return_size == 32;
struct V3D41_TMU_CONFIG_PARAMETER_0 p0_unpacked = {
};
}
}
- /* CS textures may not have return_size reflecting the shadow state. */
- nir_foreach_uniform_variable(var, c->s) {
- const struct glsl_type *type = glsl_without_array(var->type);
- unsigned array_len = MAX2(glsl_get_length(var->type), 1);
-
- if (!glsl_type_is_sampler(type) ||
- !glsl_sampler_type_is_shadow(type))
- continue;
-
- for (int i = 0; i < array_len; i++) {
- tex_options.lower_tex_packing[var->data.binding + i] =
- nir_lower_tex_packing_16;
- }
- }
-
NIR_PASS(_, c->s, nir_lower_tex, &tex_options);
NIR_PASS(_, c->s, nir_lower_system_values);
else if (V3D_DBG(TMU_32BIT))
return_size = 32;
else
- return_size = relaxed_precision || instr->is_shadow ? 16 : 32;
+ return_size = relaxed_precision ? 16 : 32;
struct v3dv_descriptor_map *map =
pipeline_get_descriptor_map(state->pipeline, binding_layout->type,
uint8_t v3d_get_rt_format(const struct v3d_device_info *devinfo, enum pipe_format f);
uint8_t v3d_get_tex_format(const struct v3d_device_info *devinfo, enum pipe_format f);
uint8_t v3d_get_tex_return_size(const struct v3d_device_info *devinfo,
- enum pipe_format f,
- enum pipe_tex_compare compare);
+ enum pipe_format f);
uint8_t v3d_get_tex_return_channels(const struct v3d_device_info *devinfo,
enum pipe_format f);
const uint8_t *v3d_get_format_swizzle(const struct v3d_device_info *devinfo,
uint8_t
v3d_get_tex_return_size(const struct v3d_device_info *devinfo,
- enum pipe_format f, enum pipe_tex_compare compare)
+ enum pipe_format f)
{
const struct v3d_format *vf = get_format(devinfo, f);
if (V3D_DBG(TMU_32BIT))
return 32;
- if (compare == PIPE_TEX_COMPARE_R_TO_TEXTURE)
- return 16;
-
return vf->return_size;
}
for (int i = 0; i < texstate->num_textures; i++) {
struct pipe_sampler_view *sampler = texstate->textures[i];
struct v3d_sampler_view *v3d_sampler = v3d_sampler_view(sampler);
- struct pipe_sampler_state *sampler_state =
- texstate->samplers[i];
if (!sampler)
continue;
- assert(sampler->target == PIPE_BUFFER || sampler_state);
-
- unsigned compare_mode = sampler_state ?
- sampler_state->compare_mode :
- PIPE_TEX_COMPARE_NONE;
-
key->sampler[i].return_size =
- v3d_get_tex_return_size(devinfo,
- sampler->format,
- compare_mode);
+ v3d_get_tex_return_size(devinfo, sampler->format);
/* For 16-bit, we set up the sampler to always return 2
* channels (meaning no recompiles for most statechanges),
* For swizzling in the shader, we don't do any pre-swizzling of the
* border color.
*/
- if (v3d_get_tex_return_size(devinfo, sview->base.format,
- sampler->compare_mode) != 32)
+ if (v3d_get_tex_return_size(devinfo, sview->base.format) != 32)
swiz = desc->swizzle[swiz];
switch (swiz) {
v3d_bo_set_reference(&stage_tex->texture_state[i].bo,
job->indirect.bo);
- uint32_t return_size = v3d_get_tex_return_size(devinfo, psview->format,
- psampler->compare_mode);
+ uint32_t return_size = v3d_get_tex_return_size(devinfo, psview->format);
struct V3D33_TEXTURE_SHADER_STATE unpacked = {
/* XXX */
}
}
} else {
- if (v3d_get_tex_return_size(&screen->devinfo, sample_format,
- PIPE_TEX_COMPARE_NONE) == 32) {
+ if (v3d_get_tex_return_size(&screen->devinfo, sample_format) == 32) {
if (util_format_is_alpha(sample_format))
so->sampler_variant = V3D_SAMPLER_STATE_32_A;
else