diff options
author | Rob Clark <[email protected]> | 2014-12-05 11:43:03 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2014-12-09 18:01:49 -0500 |
commit | 1e3a732603a4a4d5b3e7102cf0d7840f79ecf5c4 (patch) | |
tree | 30db809ed8d31c0707bb2f6024c0468751b9c948 /src/gallium/drivers/freedreno/a4xx/fd4_texture.c | |
parent | 5d7c9c9160e0d425df220e5e1898d0ab7dee2c83 (diff) |
freedreno/a4xx: texture fixes
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a4xx/fd4_texture.c')
-rw-r--r-- | src/gallium/drivers/freedreno/a4xx/fd4_texture.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c index 2b826d6325d..849113d80cc 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c @@ -165,13 +165,25 @@ fd4_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, A4XX_TEX_CONST_1_WIDTH(prsc->width0) | A4XX_TEX_CONST_1_HEIGHT(prsc->height0); so->texconst2 = + A4XX_TEX_CONST_2_FETCHSIZE(fd4_pipe2fetchsize(cso->format)) | A4XX_TEX_CONST_2_PITCH(rsc->slices[lvl].pitch * rsc->cpp); switch (prsc->target) { case PIPE_TEXTURE_1D_ARRAY: case PIPE_TEXTURE_2D_ARRAY: + so->texconst3 = + A4XX_TEX_CONST_3_DEPTH(prsc->array_size) | + A4XX_TEX_CONST_3_LAYERSZ(rsc->slices[0].size0); + break; + case PIPE_TEXTURE_CUBE: + case PIPE_TEXTURE_CUBE_ARRAY: /* ?? not sure about _CUBE_ARRAY */ + so->texconst3 = + A4XX_TEX_CONST_3_DEPTH(1) | + A4XX_TEX_CONST_3_LAYERSZ(rsc->slices[0].size0); + break; case PIPE_TEXTURE_3D: so->texconst3 = + A4XX_TEX_CONST_3_DEPTH(u_minify(prsc->depth0, lvl)) | A4XX_TEX_CONST_3_LAYERSZ(rsc->slices[0].size0); break; default: |