aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr
diff options
context:
space:
mode:
authorBruce Cherniak <[email protected]>2017-07-12 15:04:45 -0500
committerTim Rowley <[email protected]>2017-07-12 16:56:40 -0500
commit5bd9554f3d35951f4d182b460f8ea5fb3bb04e02 (patch)
treeffeb2e62f0cd9db460a5361b93ee976ec77b88c4 /src/gallium/drivers/swr
parent7a7a84c8dbe7b519df46a71ac28f8fd4965f8627 (diff)
swr: Remove hard-coded constant and "todo" comment.
Removed the hard-coded constant in favor of a #define. Also removed TODO comment. The constant value doesn't need an environment configurable option. Reviewed-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr')
-rw-r--r--src/gallium/drivers/swr/swr_scratch.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/swr/swr_scratch.cpp b/src/gallium/drivers/swr/swr_scratch.cpp
index 6a9ab10ee2f..d298a48dc0b 100644
--- a/src/gallium/drivers/swr/swr_scratch.cpp
+++ b/src/gallium/drivers/swr/swr_scratch.cpp
@@ -28,6 +28,7 @@
#include "swr_fence_work.h"
#include "api.h"
+#define SCRATCH_SINGLE_ALLOCATION_LIMIT 2048
void *
swr_copy_to_scratch_space(struct swr_context *ctx,
@@ -39,7 +40,7 @@ swr_copy_to_scratch_space(struct swr_context *ctx,
assert(space);
assert(size);
- if (size >= 2048) { /* XXX TODO create KNOB_ for this */
+ if (size >= SCRATCH_SINGLE_ALLOCATION_LIMIT) {
/* Use per draw SwrAllocDrawContextMemory for larger copies */
ptr = ctx->api.pfnSwrAllocDrawContextMemory(ctx->swrContext, size, 4);
} else {