diff options
author | Kenneth Graunke <[email protected]> | 2018-08-23 20:58:32 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2018-08-24 00:36:01 -0700 |
commit | 9d670fd86cc13df0ddff5c6fcb0835926e9a8088 (patch) | |
tree | b08ebee381703f36a5c1d22ee9becde4116a22bf /src/mesa/main | |
parent | 8e1be9a34ac8ce6f115eaf2ab0d99b6a0ce37630 (diff) |
Revert recent changes about not including compute in combined limits.
As far as I can tell, no one reviewed these changes, they made i965
assert fail on driver load, and I am not certain they are correct.
(Hopefully reverting these does not break radeonsi too badly...)
The uniform related changes seem fine and reasonable, but the texture
image units change is possibly incorrect. According to the
OES_tessellation_shader spec issue 5:
(5) How are aggregate shader limits computed?
RESOLVED: Following the GL 4.4 model, but we restrict uniform
buffer bindings to 12/stage instead of 14, this results in
MAX_UNIFORM_BUFFER_BINDINGS = 72
This is 12 bindings/stage * 6 shader stages, allowing a static
partitioning of the bindings even though at most 5 stages can
appear in a program object).
MAX_COMBINED_UNIFORM_BLOCKS = 60
This is 12 blocks/stage * 5 stages, since compute shaders can't
be mixed with other stages.
MAX_COMBINED_TEXTURE_IMAGE_UNITS = 96
This is 16 textures/stage * 6 stages.
which definitely is including compute shaders in that last limit.
Not including compute shaders breaks the following test:
dEQP-GLES31.functional.state_query.integer.max_combined_texture_image_units_getinteger
There was enough breakage that I figured we should just send this back
to the drawing board.
Revert "i965: don't include compute resources in "Combined" limits"
Revert "st/mesa: don't include compute resources in "Combined" limits"
Revert "mesa: don't include compute resources in MAX_COMBINED_* limits"
This reverts commit b03dcb1e5f507c5950d0de053a6f76e6306ee71f.
This reverts commit cff290df4c09547cd2cb3b129ec59bdebdadba90.
This reverts commit 45f87a48f94148b484961f18a4f1ccf86f066b1c.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/config.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index 19bc6b2457e..6f514650009 100644 --- a/src/mesa/main/config.h +++ b/src/mesa/main/config.h @@ -173,19 +173,17 @@ #define MAX_UNIFORMS 4096 #define MAX_UNIFORM_BUFFERS 15 /* + 1 default uniform buffer */ #define MAX_SHADER_STORAGE_BUFFERS 16 -/* 5 is for vertex, hull, domain, geometry, and fragment shader. Don't - * include compute. - */ -#define MAX_COMBINED_UNIFORM_BUFFERS (MAX_UNIFORM_BUFFERS * 5) -#define MAX_COMBINED_SHADER_STORAGE_BUFFERS (MAX_SHADER_STORAGE_BUFFERS * 5) +/* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */ +#define MAX_COMBINED_UNIFORM_BUFFERS (MAX_UNIFORM_BUFFERS * 6) +#define MAX_COMBINED_SHADER_STORAGE_BUFFERS (MAX_SHADER_STORAGE_BUFFERS * 6) #define MAX_ATOMIC_COUNTERS 4096 -/* 5 is for vertex, hull, domain, geometry, and fragment shader. */ -#define MAX_COMBINED_ATOMIC_BUFFERS (MAX_UNIFORM_BUFFERS * 5) +/* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */ +#define MAX_COMBINED_ATOMIC_BUFFERS (MAX_UNIFORM_BUFFERS * 6) /* Size of an atomic counter in bytes according to ARB_shader_atomic_counters */ #define ATOMIC_COUNTER_SIZE 4 #define MAX_IMAGE_UNIFORMS 32 -/* 5 is for vertex, hull, domain, geometry, and fragment shader. */ -#define MAX_IMAGE_UNITS (MAX_IMAGE_UNIFORMS * 5) +/* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */ +#define MAX_IMAGE_UNITS (MAX_IMAGE_UNIFORMS * 6) /*@}*/ /** @@ -224,10 +222,8 @@ /** For GL_ARB_vertex_shader */ /*@{*/ #define MAX_VERTEX_GENERIC_ATTRIBS 16 -/* 5 is the number of shader stages that can be used at the same time. - * compute can't be used at the same time as other shaders. - */ -#define MAX_COMBINED_TEXTURE_IMAGE_UNITS (MAX_TEXTURE_IMAGE_UNITS * 5) +/* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */ +#define MAX_COMBINED_TEXTURE_IMAGE_UNITS (MAX_TEXTURE_IMAGE_UNITS * 6) /*@}*/ |