summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeha Bhende <bhenden@vmware.com>2020-02-10 10:39:51 -0800
committerDylan Baker <dylan@pnwbakers.com>2020-02-11 09:27:00 -0800
commitc17c8119c3d8b3a8efb04d74db76337929adea11 (patch)
tree8340c9472de5eaa3eea52c0e3ee06cf6ac053aaf
parentdfcc06cd7a2fcf03fe8a022d47131239cbbec9f1 (diff)
svga: fix size of format_conversion_table[]
Since we are now using sparse matrix for format_conversion_table, we have to make sure we have last entry in table which gives the sense of required size of format_conversion_table Fixes: 84db6ba7 ("svga: Drop unsupported formats from the format table") Reviewed-by: Charmaine Lee <charmainel@vmware.com> (cherry picked from commit 470e73e7f86b4530cf789a779f43674ecec91881)
-rw-r--r--.pick_status.json2
-rw-r--r--src/gallium/drivers/svga/svga_format.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 14900d5febb..95ebc79221d 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -589,7 +589,7 @@
"description": "svga: fix size of format_conversion_table[]",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "84db6ba740d376b75e60c3a2a4ac0153c5b0e01a"
},
diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c
index d51e348fc43..1ce3cdc4854 100644
--- a/src/gallium/drivers/svga/svga_format.c
+++ b/src/gallium/drivers/svga/svga_format.c
@@ -207,6 +207,8 @@ static const struct vgpu10_format_entry format_conversion_table[] =
[ PIPE_FORMAT_L32_SINT ] = { SVGA3D_FORMAT_INVALID, SVGA3D_FORMAT_INVALID, SVGA3D_R32_SINT, TF_XXX1 },
[ PIPE_FORMAT_L32A32_SINT ] = { SVGA3D_FORMAT_INVALID, SVGA3D_FORMAT_INVALID, SVGA3D_R32G32_SINT, TF_XXXY },
[ PIPE_FORMAT_R10G10B10A2_UINT ] = { SVGA3D_R10G10B10A2_UINT, SVGA3D_R10G10B10A2_UINT, SVGA3D_R10G10B10A2_UINT, 0 },
+ /* Must specify following entry to give the sense of size of format_conversion_table[] */
+ [ PIPE_FORMAT_COUNT ] = {SVGA3D_FORMAT_INVALID, SVGA3D_FORMAT_INVALID, SVGA3D_FORMAT_INVALID, 0 },
};