| 1 |
/* |
| 2 |
* Copyright © 2012-2013 Rob Clark <[email protected]> |
| 3 |
* SPDX-License-Identifier: MIT |
| 4 |
* |
| 5 |
* Authors: |
| 6 |
* Rob Clark <[email protected]> |
| 7 |
*/ |
| 8 |
|
| 9 |
#ifndef FD2_TEXTURE_H_ |
| 10 |
#define FD2_TEXTURE_H_ |
| 11 |
|
| 12 |
#include "pipe/p_context.h" |
| 13 |
|
| 14 |
#include "freedreno_resource.h" |
| 15 |
#include "freedreno_texture.h" |
| 16 |
|
| 17 |
#include "fd2_context.h" |
| 18 |
#include "fd2_util.h" |
| 19 |
|
| 20 |
struct fd2_sampler_stateobj { |
| 21 |
struct pipe_sampler_state base; |
| 22 |
uint32_t tex0, tex3, tex4; |
| 23 |
}; |
| 24 |
|
| 25 |
static inline struct fd2_sampler_stateobj * |
| 26 |
fd2_sampler_stateobj(struct pipe_sampler_state *samp) |
| 27 |
{ |
| 28 |
return (struct fd2_sampler_stateobj *)samp; |
| 29 |
} |
| 30 |
|
| 31 |
struct fd2_pipe_sampler_view { |
| 32 |
struct pipe_sampler_view base; |
| 33 |
uint32_t tex0, tex1, tex2, tex3, tex4, tex5; |
| 34 |
}; |
| 35 |
|
| 36 |
static inline struct fd2_pipe_sampler_view * |
| 37 |
fd2_pipe_sampler_view(struct pipe_sampler_view *pview) |
| 38 |
{ |
| 39 |
return (struct fd2_pipe_sampler_view *)pview; |
| 40 |
} |
| 41 |
|
| 42 |
unsigned fd2_get_const_idx(struct fd_context *ctx, |
| 43 |
struct fd_texture_stateobj *tex, unsigned samp_id); |
| 44 |
|
| 45 |
void fd2_texture_init(struct pipe_context *pctx); |
| 46 |
|
| 47 |
#endif /* FD2_TEXTURE_H_ */ |