X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Ffreedreno%2Fir3%2Fir3_shader.h;h=077ba5db3797e1186895097a62dae8a99de4f212;hb=d00a239b288c5df7003f30ac80d156e70f27acf7;hp=c89dc29ff08784956934e611e66b91aa9cec3f94;hpb=5b955f09f72b2217576ea8980a3d8fd3ba63854a;p=mesa.git diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.h b/src/gallium/drivers/freedreno/ir3/ir3_shader.h index c89dc29ff08..077ba5db379 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_shader.h +++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.h @@ -81,6 +81,7 @@ struct ir3_shader_key { * Vertex shader variant parameters: */ unsigned binning_pass : 1; + unsigned vclamp_color : 1; /* * Fragment shader variant parameters: @@ -91,6 +92,7 @@ struct ir3_shader_key { * for front/back color inputs to frag shader: */ unsigned rasterflat : 1; + unsigned fclamp_color : 1; }; uint32_t global; }; @@ -104,6 +106,9 @@ struct ir3_shader_key { * shader: */ uint16_t fsaturate_s, fsaturate_t, fsaturate_r; + + /* bitmask of samplers which need astc srgb workaround: */ + uint16_t vastc_srgb, fastc_srgb; }; static inline bool @@ -222,6 +227,14 @@ struct ir3_shader_variant { uint32_t val[4]; } immediates[64]; + /* for astc srgb workaround, the number/base of additional + * alpha tex states we need, and index of original tex states + */ + struct { + unsigned base, count; + unsigned orig_idx[16]; + } astc_srgb; + /* shader variants form a linked list: */ struct ir3_shader_variant *next; @@ -250,10 +263,11 @@ struct ir3_shader { void * ir3_shader_assemble(struct ir3_shader_variant *v, uint32_t gpu_id); struct ir3_shader * ir3_shader_create(struct ir3_compiler *compiler, - const struct pipe_shader_state *cso, enum shader_t type); + const struct pipe_shader_state *cso, enum shader_t type, + struct pipe_debug_callback *debug); void ir3_shader_destroy(struct ir3_shader *shader); struct ir3_shader_variant * ir3_shader_variant(struct ir3_shader *shader, - struct ir3_shader_key key); + struct ir3_shader_key key, struct pipe_debug_callback *debug); void ir3_shader_disasm(struct ir3_shader_variant *so, uint32_t *bin); struct fd_ringbuffer;