ir3: Don't calculate num_samp ourselves
In addition to duplicating what core NIR does better, this was wrong for Vulkan, where it should be 0 as there are no non-bindless samplers. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5519>
This commit is contained in:
parent
568e06b3a6
commit
168c42290f
|
@ -3317,15 +3317,11 @@ emit_instructions(struct ir3_context *ctx)
|
||||||
setup_output(ctx, var);
|
setup_output(ctx, var);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find # of samplers: */
|
/* Find # of samplers. Just assume that we'll be reading from images.. if
|
||||||
nir_foreach_variable (var, &ctx->s->uniforms) {
|
* it is write-only we don't have to count it, but after lowering derefs
|
||||||
ctx->so->num_samp += glsl_type_get_sampler_count(var->type);
|
* is too late to compact indices for that.
|
||||||
/* just assume that we'll be reading from images.. if it
|
|
||||||
* is write-only we don't have to count it, but not sure
|
|
||||||
* if there is a good way to know?
|
|
||||||
*/
|
*/
|
||||||
ctx->so->num_samp += glsl_type_get_image_count(var->type);
|
ctx->so->num_samp = util_last_bit(ctx->s->info.textures_used) + ctx->s->info.num_images;
|
||||||
}
|
|
||||||
|
|
||||||
/* NOTE: need to do something more clever when we support >1 fxn */
|
/* NOTE: need to do something more clever when we support >1 fxn */
|
||||||
nir_foreach_register (reg, &fxn->registers) {
|
nir_foreach_register (reg, &fxn->registers) {
|
||||||
|
|
Loading…
Reference in New Issue