diff options
author | Rob Clark <[email protected]> | 2019-02-20 17:33:23 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-02-20 18:50:08 -0500 |
commit | 323958908e5f98d7d9c7cee0797ad365adb4e19e (patch) | |
tree | 1791ecc310d726b3a17d8689725e89ff30ee01da /src/gallium | |
parent | 50dd773a2d15570944d3955bb851b46ac345cdf4 (diff) |
freedreno/a6xx: samplerBuffer fixes
Use the 'UNK31' bit (which should probably be called 'BUFFER') for
samplerBuffer case, which increases the size of supported buffer
texture beyond 2^15 elements.
Also need to fix the 2nd coord injected to handle the tex instructions
that take integer coords.
Fixes dEQP-GLES31.functional.texture.texture_buffer.render.as_fragment_texture.buffer_size_131071
and similar
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_texture.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_screen.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c index 171a016d985..0d6bec72b14 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c @@ -260,11 +260,11 @@ fd6_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, lvl = 0; so->texconst1 = - A6XX_TEX_CONST_1_WIDTH(elements) | - A6XX_TEX_CONST_1_HEIGHT(1); + A6XX_TEX_CONST_1_WIDTH(elements & MASK(15)) | + A6XX_TEX_CONST_1_HEIGHT(elements >> 15); so->texconst2 = - A6XX_TEX_CONST_2_FETCHSIZE(fd6_pipe2fetchsize(format)) | - A6XX_TEX_CONST_2_PITCH(elements * rsc->cpp); + A6XX_TEX_CONST_2_UNK4 | + A6XX_TEX_CONST_2_UNK31; so->offset = cso->u.buf.offset; } else { unsigned miplevels; diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index c5a96a87dc0..d9918f45c37 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -243,7 +243,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) if (is_a3xx(screen)) return 16; if (is_a4xx(screen)) return 32; if (is_a5xx(screen)) return 32; - if (is_a6xx(screen)) return 32; + if (is_a6xx(screen)) return 64; return 0; case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE: /* We could possibly emulate more by pretending 2d/rect textures and @@ -252,7 +252,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) if (is_a3xx(screen)) return 8192; if (is_a4xx(screen)) return 16384; if (is_a5xx(screen)) return 16384; - if (is_a6xx(screen)) return 16384; + if (is_a6xx(screen)) return 1 << 27; return 0; case PIPE_CAP_TEXTURE_FLOAT_LINEAR: |