llvmpipe: enable ARB_shader_storage_buffer_object
authorDave Airlie <airlied@redhat.com>
Wed, 26 Jun 2019 05:58:09 +0000 (15:58 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 7 Jul 2019 06:24:17 +0000 (16:24 +1000)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_limits.h
src/gallium/drivers/llvmpipe/lp_screen.c

index be72641bb2bc1504336ffa3e88a15b970220532f..e9c5715d5b966b453ff05d5aac5d799b3cbb381b 100644 (file)
@@ -140,7 +140,6 @@ gallivm_get_shader_param(enum pipe_shader_cap param)
    case PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED:
    case PIPE_SHADER_CAP_TGSI_LDEXP_SUPPORTED:
    case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED:
-   case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS:
    case PIPE_SHADER_CAP_MAX_SHADER_IMAGES:
    case PIPE_SHADER_CAP_LOWER_IF_THRESHOLD:
    case PIPE_SHADER_CAP_TGSI_SKIP_MERGE_REGISTERS:
@@ -151,6 +150,8 @@ gallivm_get_shader_param(enum pipe_shader_cap param)
       return 1;
    case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
       return 32;
+   case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS:
+      return LP_MAX_TGSI_SHADER_BUFFERS;
    }
    /* if we get here, we missed a shader cap above (and should have seen
     * a compiler warning.)
index 3d5fbb06231c82812f2087f911eafa8a9a2418eb..ba55931ee4fdd9936a226d1dd5fbfaedbd415d0e 100644 (file)
@@ -313,6 +313,8 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
       return 1;
    case PIPE_CAP_MAX_VARYINGS:
       return 32;
+   case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
+      return 1;
    case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
    case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
    case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
@@ -327,7 +329,6 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
    case PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL:
    case PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL:
-   case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
    case PIPE_CAP_INVALIDATE_BUFFER:
    case PIPE_CAP_GENERATE_MIPMAP:
    case PIPE_CAP_STRING_MARKER:
@@ -383,8 +384,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_GS_INVOCATIONS:
       return 32;
    case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
-      return 1 << 27;
-
+      return LP_MAX_TGSI_SHADER_BUFFER_SIZE;
    default:
       return u_pipe_screen_get_param_defaults(screen, param);
    }