diff options
author | Eric Anholt <[email protected]> | 2017-12-11 12:52:27 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-01-14 15:40:55 -0800 |
commit | 6281f26f064ada36b57d45feb68d8e7d783198c9 (patch) | |
tree | d06588f36d6e2d273ae33cd9aaca640b3d027039 /src/gallium/drivers/v3d/v3d_screen.c | |
parent | 5932c2f0b9b56e6eeee87baa7b0b493227850f69 (diff) |
v3d: Add support for shader_image_load_store.
This is only exposed on V3D 4.1+, because we didn't have the TMU write
operations for images on 3.3 (To do GLES 3.1 there, you have to lower it
to SSBO load/stores, which is a problem to solve later).
Diffstat (limited to 'src/gallium/drivers/v3d/v3d_screen.c')
-rw-r--r-- | src/gallium/drivers/v3d/v3d_screen.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index dd5eda87e8f..bee036a96d3 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -240,6 +240,8 @@ static int v3d_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, enum pipe_shader_cap param) { + struct v3d_screen *screen = v3d_screen(pscreen); + if (shader != PIPE_SHADER_VERTEX && shader != PIPE_SHADER_FRAGMENT) { return 0; @@ -298,12 +300,17 @@ v3d_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, return 1; case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: - case PIPE_SHADER_CAP_MAX_SHADER_IMAGES: return VC5_MAX_TEXTURE_SAMPLERS; case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS: return PIPE_MAX_SHADER_BUFFERS; + case PIPE_SHADER_CAP_MAX_SHADER_IMAGES: + if (screen->devinfo.ver < 41) + return 0; + else + return PIPE_MAX_SHADER_IMAGES; + case PIPE_SHADER_CAP_PREFERRED_IR: return PIPE_SHADER_IR_NIR; case PIPE_SHADER_CAP_SUPPORTED_IRS: |