i965: Define BRW_MAX_UBO
Instead of using hard-coded values. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
4caa10193f
commit
440f9348c1
|
@ -326,7 +326,7 @@ brw_initialize_context_constants(struct brw_context *brw)
|
|||
ctx->Const.MaxUniformBlockSize = 65536;
|
||||
for (int i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||
struct gl_program_constants *prog = &ctx->Const.Program[i];
|
||||
prog->MaxUniformBlocks = 12;
|
||||
prog->MaxUniformBlocks = BRW_MAX_UBO;
|
||||
prog->MaxCombinedUniformComponents =
|
||||
prog->MaxUniformComponents +
|
||||
ctx->Const.MaxUniformBlockSize / 4 * prog->MaxUniformBlocks;
|
||||
|
@ -346,7 +346,7 @@ brw_initialize_context_constants(struct brw_context *brw)
|
|||
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits = 0;
|
||||
if (_mesa_extension_override_enables.ARB_compute_shader) {
|
||||
ctx->Const.Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits = BRW_MAX_TEX_UNIT;
|
||||
ctx->Const.MaxUniformBufferBindings += 12;
|
||||
ctx->Const.MaxUniformBufferBindings += BRW_MAX_UBO;
|
||||
} else {
|
||||
ctx->Const.Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits = 0;
|
||||
}
|
||||
|
|
|
@ -708,6 +708,9 @@ struct brw_vs_prog_data {
|
|||
/** Max number of render targets in a shader */
|
||||
#define BRW_MAX_DRAW_BUFFERS 8
|
||||
|
||||
/** Max number of UBOs in a shader */
|
||||
#define BRW_MAX_UBO 12
|
||||
|
||||
/** Max number of atomic counter buffer objects in a shader */
|
||||
#define BRW_MAX_ABO 16
|
||||
|
||||
|
@ -744,7 +747,7 @@ struct brw_vs_prog_data {
|
|||
|
||||
#define BRW_MAX_SURFACES (BRW_MAX_DRAW_BUFFERS + \
|
||||
BRW_MAX_TEX_UNIT * 2 + /* normal, gather */ \
|
||||
12 + /* ubo */ \
|
||||
BRW_MAX_UBO + \
|
||||
BRW_MAX_ABO + \
|
||||
BRW_MAX_IMAGES + \
|
||||
2 + /* shader time, pull constants */ \
|
||||
|
|
Loading…
Reference in New Issue