mesa: move gl_external_samplers() to program.[ch]
The function is only called from a couple places. It doesn't make sense to have it in mtypes.h Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include "prog_cache.h"
|
||||
#include "prog_parameter.h"
|
||||
#include "prog_instruction.h"
|
||||
#include "util/bitscan.h"
|
||||
#include "util/ralloc.h"
|
||||
#include "util/u_atomic.h"
|
||||
|
||||
@@ -547,3 +548,19 @@ _mesa_get_min_invocations_per_fragment(struct gl_context *ctx,
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
GLbitfield
|
||||
gl_external_samplers(const struct gl_program *prog)
|
||||
{
|
||||
GLbitfield external_samplers = 0;
|
||||
GLbitfield mask = prog->SamplersUsed;
|
||||
|
||||
while (mask) {
|
||||
int idx = u_bit_scan(&mask);
|
||||
if (prog->sh.SamplerTargets[idx] == TEXTURE_EXTERNAL_INDEX)
|
||||
external_samplers |= (1 << idx);
|
||||
}
|
||||
|
||||
return external_samplers;
|
||||
}
|
||||
|
Reference in New Issue
Block a user