[virglrenderer-devel] [PATCH 21/21] features: disallow ssbos if we don't have the feature
Dave Airlie
airlied at gmail.com
Tue Jul 24 03:39:13 UTC 2018
From: Dave Airlie <airlied at redhat.com>
---
src/vrend_renderer.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 309fe4d..ebea467 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -1075,6 +1075,8 @@ static void bind_ssbo_locs(struct vrend_linked_shader_program *sprog,
{
int i;
char name[32];
+ if (has_feature(feat_ssbo))
+ return;
if (sprog->ss[id]->sel->sinfo.ssbo_used_mask) {
const char *prefix = pipe_shader_to_prefix(id);
uint32_t mask = sprog->ss[id]->sel->sinfo.ssbo_used_mask;
@@ -2403,6 +2405,10 @@ void vrend_set_single_ssbo(struct vrend_context *ctx,
{
struct vrend_ssbo *ssbo = &ctx->sub->ssbo[shader_type][index];
struct vrend_resource *res;
+
+ if (has_feature(feat_ssbo))
+ return;
+
if (handle) {
res = vrend_renderer_ctx_res_lookup(ctx, handle);
if (!res) {
@@ -3331,6 +3337,9 @@ static void vrend_draw_bind_ssbo_shader(struct vrend_context *ctx, int shader_ty
struct vrend_resource *res;
int i;
+ if (has_feature(feat_ssbo))
+ return;
+
if (!ctx->sub->prog->ssbo_locs[shader_type])
return;
--
2.17.1
More information about the virglrenderer-devel
mailing list