summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-07-10 08:36:15 -0600
committerAndres Gomez <[email protected]>2017-07-12 19:32:10 +0300
commit8d0fa95bf222153cb5c8919c93a5011e0ca59ddc (patch)
tree549c573e96963eae7445c699f99f51a479eb10fb /src
parent82aff6ad188db4703e55593e136e45824f7e9ad9 (diff)
svga: fix PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE value
This query is supposed to return the max texture buffer size/width in texels, not size in bytes. Divide by 16 (the largest format size) to return texels. Fixes Piglit arb_texture_buffer_object-max-size test. Cc: [email protected] Reviewed-by :Charmaine Lee <[email protected]> (cherry picked from commit 3b28eaabf603657c388caa72bc92b1b660d00b2a)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/svga/svga_screen.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 9be806d826f..07f33462471 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -303,7 +303,10 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
return svgascreen->ms_samples ? 1 : 0;
case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
- return SVGA3D_DX_MAX_RESOURCE_SIZE;
+ /* convert bytes to texels for the case of the largest texel
+ * size: float[4].
+ */
+ return SVGA3D_DX_MAX_RESOURCE_SIZE / (4 * sizeof(float));
case PIPE_CAP_MIN_TEXEL_OFFSET:
return sws->have_vgpu10 ? VGPU10_MIN_TEXEL_FETCH_OFFSET : 0;