diff options
author | Marek Olšák <[email protected]> | 2014-07-24 20:32:08 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-07-28 23:57:08 +0200 |
commit | 04f2c88f45e26d7050cc88aaaac8e8154d6018d0 (patch) | |
tree | f2c3713a675d01a3a44f90c01b69d44aecfdb7b5 /src/gallium/drivers | |
parent | d5bcb5e8dea3dc949ff6b093af7f46585b94b63e (diff) |
gallium: rename shader cap MAX_CONSTS to MAX_CONST_BUFFER_SIZE
This new name isn't so confusing.
I also changed the gallivm limit, because it looked wrong.
Reviewed-by: Brian Paul <[email protected]>
v2: use sizeof(float[4])
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_screen.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_screen.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/ilo_screen.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_screen.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_screen.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_screen.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_screen.c | 8 |
11 files changed, 26 insertions, 26 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index d4a928a7c1a..8fae5dddaba 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -329,8 +329,8 @@ fd_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, return 64; /* Max native temporaries. */ case PIPE_SHADER_CAP_MAX_ADDRS: return 1; /* Max native address registers */ - case PIPE_SHADER_CAP_MAX_CONSTS: - return (screen->gpu_id >= 300) ? 1024 : 64; + case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: + return ((screen->gpu_id >= 300) ? 1024 : 64) * sizeof(float[4]); case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return 1; case PIPE_SHADER_CAP_MAX_PREDS: diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c index 86a7a6731f1..133c773a0be 100644 --- a/src/gallium/drivers/i915/i915_screen.c +++ b/src/gallium/drivers/i915/i915_screen.c @@ -129,8 +129,8 @@ i915_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_sha return 0; case PIPE_SHADER_CAP_MAX_INPUTS: return 10; - case PIPE_SHADER_CAP_MAX_CONSTS: - return 32; + case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: + return 32 * sizeof(float[4]); case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return 1; case PIPE_SHADER_CAP_MAX_TEMPS: diff --git a/src/gallium/drivers/ilo/ilo_screen.c b/src/gallium/drivers/ilo/ilo_screen.c index d22691101d9..fde4cc4f34c 100644 --- a/src/gallium/drivers/ilo/ilo_screen.c +++ b/src/gallium/drivers/ilo/ilo_screen.c @@ -116,8 +116,8 @@ ilo_get_shader_param(struct pipe_screen *screen, unsigned shader, case PIPE_SHADER_CAP_MAX_INPUTS: /* this is limited by how many attributes SF can remap */ return 16; - case PIPE_SHADER_CAP_MAX_CONSTS: - return 1024; + case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: + return 1024 * sizeof(float[4]); case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return ILO_MAX_CONST_BUFFERS; case PIPE_SHADER_CAP_MAX_TEMPS: diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c index 32f55236c48..4fa34e372f7 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c @@ -198,8 +198,8 @@ nv30_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, return 0; case PIPE_SHADER_CAP_MAX_INPUTS: return 16; - case PIPE_SHADER_CAP_MAX_CONSTS: - return (eng3d->oclass >= NV40_3D_CLASS) ? (468 - 6): (256 - 6); + case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: + return ((eng3d->oclass >= NV40_3D_CLASS) ? (468 - 6): (256 - 6)) * sizeof(float[4]); case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return 1; case PIPE_SHADER_CAP_MAX_TEMPS: @@ -235,8 +235,8 @@ nv30_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, return 0; case PIPE_SHADER_CAP_MAX_INPUTS: return 8; /* should be possible to do 10 with nv4x */ - case PIPE_SHADER_CAP_MAX_CONSTS: - return (eng3d->oclass >= NV40_3D_CLASS) ? 224 : 32; + case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: + return ((eng3d->oclass >= NV40_3D_CLASS) ? 224 : 32) * sizeof(float[4]); case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return 1; case PIPE_SHADER_CAP_MAX_TEMPS: diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index fd63819c397..677f688f445 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -232,8 +232,8 @@ nv50_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, if (shader == PIPE_SHADER_VERTEX) return 32; return 15; - case PIPE_SHADER_CAP_MAX_CONSTS: - return 65536 / 16; + case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: + return 65536; case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return NV50_MAX_PIPE_CONSTBUFS; case PIPE_SHADER_CAP_MAX_ADDRS: diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index 3f444a4f57d..24aee6b5ab7 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -238,8 +238,8 @@ nvc0_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, * and excludes 0x60 per-patch inputs. */ return 0x200 / 16; - case PIPE_SHADER_CAP_MAX_CONSTS: - return 65536 / 16; + case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: + return 65536; case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: if (shader == PIPE_SHADER_COMPUTE && class_3d >= NVE4_3D_CLASS) return NVE4_MAX_PIPE_CONSTBUFS_COMPUTE; diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index efa69d3575e..a2ac26ad79c 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -241,8 +241,8 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, e * additional texcoords but there is no two-sided color * selection then. However the facing bit can be used instead. */ return 10; - case PIPE_SHADER_CAP_MAX_CONSTS: - return is_r500 ? 256 : 32; + case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: + return (is_r500 ? 256 : 32) * sizeof(float[4]); case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return 1; case PIPE_SHADER_CAP_MAX_TEMPS: @@ -289,8 +289,8 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, e return is_r500 ? 4 : 0; /* For loops; not sure about conditionals. */ case PIPE_SHADER_CAP_MAX_INPUTS: return 16; - case PIPE_SHADER_CAP_MAX_CONSTS: - return 256; + case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: + return 256 * sizeof(float[4]); case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return 1; case PIPE_SHADER_CAP_MAX_TEMPS: diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index ee6a4160dd1..f243159982e 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -419,7 +419,7 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e case PIPE_SHADER_CAP_MAX_ADDRS: /* XXX Isn't this equal to TEMPS? */ return 1; /* Max native address registers */ - case PIPE_SHADER_CAP_MAX_CONSTS: + case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: return R600_MAX_CONST_BUFFER_SIZE; case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return R600_MAX_USER_CONST_BUFFERS; diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 4585ace155e..6422e3ee70e 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -54,7 +54,7 @@ #define R600_BUFFER_INFO_CONST_BUFFER (R600_MAX_USER_CONST_BUFFERS + 2) #define R600_GS_RING_CONST_BUFFER (R600_MAX_USER_CONST_BUFFERS + 3) -#define R600_MAX_CONST_BUFFER_SIZE 4096 +#define R600_MAX_CONST_BUFFER_SIZE (4096 * sizeof(float[4])) #ifdef PIPE_ARCH_BIG_ENDIAN #define R600_BIG_ENDIAN 1 diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 4f192687289..635b37d81c6 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -350,8 +350,8 @@ static int si_get_shader_param(struct pipe_screen* pscreen, unsigned shader, enu case PIPE_SHADER_CAP_MAX_ADDRS: /* FIXME Isn't this equal to TEMPS? */ return 1; /* Max native address registers */ - case PIPE_SHADER_CAP_MAX_CONSTS: - return 4096; /* actually only memory limits this */ + case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: + return 4096 * sizeof(float[4]); /* actually only memory limits this */ case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return SI_NUM_USER_CONST_BUFFERS; case PIPE_SHADER_CAP_MAX_PREDS: diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index b213b04bacd..9326c777526 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -313,8 +313,8 @@ static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, en return SVGA3D_MAX_NESTING_LEVEL; case PIPE_SHADER_CAP_MAX_INPUTS: return 10; - case PIPE_SHADER_CAP_MAX_CONSTS: - return 224; + case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: + return 224 * sizeof(float[4]); case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return 1; case PIPE_SHADER_CAP_MAX_TEMPS: @@ -371,8 +371,8 @@ static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, en return SVGA3D_MAX_NESTING_LEVEL; case PIPE_SHADER_CAP_MAX_INPUTS: return 16; - case PIPE_SHADER_CAP_MAX_CONSTS: - return 256; + case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: + return 256 * sizeof(float[4]); case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return 1; case PIPE_SHADER_CAP_MAX_TEMPS: |