/[packages]/cauldron/mesa/current/SOURCES/0014-anv-Treat-zero-size-XFB-buffer-as-disabled.patch
ViewVC logotype

Contents of /cauldron/mesa/current/SOURCES/0014-anv-Treat-zero-size-XFB-buffer-as-disabled.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1379265 - (show annotations) (download)
Wed Mar 20 17:08:42 2019 UTC (2 months ago) by tmb
File size: 2172 byte(s)
more fixes from staging/19.0 branch
1 From ddea2a99c5c5ca31d02a234308728e51950c0347 Mon Sep 17 00:00:00 2001
2 From: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
3 Date: Mon, 18 Mar 2019 12:53:30 +0200
4 Subject: [PATCH 14/24] anv: Treat zero size XFB buffer as disabled
5
6 Vulkan spec doesn't explicitly forbid zero size transform
7 feedback buffers.
8 Having zero size xfb caused SurfaceSize overflow and
9 triggered assert in debug build.
10
11 The only way to have zero size SO_BUFFER is to disable
12 SO_BUFFER as stated in hardware spec.
13
14 From SKL PRM, Vol 2a, "3DSTATE_SO_BUFFER":
15 "If set, stream output to SO Buffer is enabled,
16 if 3DSTATE_STREAMOUT::SO Function ENABLE is also enabled.
17 If clear, the SO Buffer is considered "not bound" and effectively
18 treated as a zero- length buffer for the purposes of SO output and
19 overflow detection. If an enabled stream's Stream to Buffer Selects
20 includes this buffer it is by definition an overflow condition.
21 That stream will cause no writes to occur,
22 and only SO_PRIM_STORAGE_NEEDED[<stream>] will increment."
23
24 Fixes: 36ee2fd61c8 "anv: Implement the basic form of VK_EXT_transform_feedback"
25
26 Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
27 Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
28 Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
29 (cherry picked from commit ecb98c68988570806c239c7cc705c69a98aafc23)
30 ---
31 src/intel/vulkan/genX_cmd_buffer.c | 2 +-
32 1 file changed, 1 insertion(+), 1 deletion(-)
33
34 diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
35 index d980ec428d0..a3994f5870c 100644
36 --- a/src/intel/vulkan/genX_cmd_buffer.c
37 +++ b/src/intel/vulkan/genX_cmd_buffer.c
38 @@ -2653,7 +2653,7 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
39 anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_SO_BUFFER), sob) {
40 sob.SOBufferIndex = idx;
41
42 - if (cmd_buffer->state.xfb_enabled && xfb->buffer) {
43 + if (cmd_buffer->state.xfb_enabled && xfb->buffer && xfb->size != 0) {
44 sob.SOBufferEnable = true;
45 sob.MOCS = cmd_buffer->device->default_mocs,
46 sob.StreamOffsetWriteEnable = false;
47 --
48 2.21.0
49

  ViewVC Help
Powered by ViewVC 1.1.26