summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_compiler.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2017-07-24 10:28:17 +0200
committerChristian Gmeiner <[email protected]>2017-08-06 20:44:02 +0200
commit39056b0e2ac10342d8a3a6000f12a510f5dbd773 (patch)
tree2af42477d466d63ab23518123737f70b0e52e760 /src/gallium/drivers/etnaviv/etnaviv_compiler.h
parent6c321c8b0b3547b0af0b0939391eef4dc8d2f873 (diff)
etnaviv: Implement ICACHE
This patch adds support for large shaders on GC3000. For example the "terrain" glmark benchmark with a large fragment shader will work after this. If the GPU supports ICACHE, shaders larger than the available state area will be uploaded to a bo of their own and instructed to be loaded from memory on demand. Small shaders will be uploaded in the usual way. This mimics the behavior of the blob. On GPUs that don't support ICACHE, this patch should make no difference. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_compiler.h')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_compiler.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler.h b/src/gallium/drivers/etnaviv/etnaviv_compiler.h
index 88a093fd918..f5c16890a66 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_compiler.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_compiler.h
@@ -94,12 +94,17 @@ struct etna_shader_variant {
/* unknown input property (XX_INPUT_COUNT, field UNK8) */
uint32_t input_count_unk8;
+ /* shader is larger than GPU instruction limit, thus needs icache */
+ bool needs_icache;
+
/* shader variants form a linked list */
struct etna_shader_variant *next;
/* replicated here to avoid passing extra ptrs everywhere */
struct etna_shader *shader;
struct etna_shader_key key;
+
+ struct etna_bo *bo; /* cached code memory bo handle (for icache) */
};
struct etna_varying {