* hashing for now until this is shown to be worthwhile. */
break;
case PIPE_SHADER_GEOMETRY:
- hash = _mesa_hash_data_with_seed(&key->gs, sizeof(key->gs), hash);
+ hash += key->gs.all;
break;
case PIPE_SHADER_FRAGMENT:
- hash = _mesa_hash_data_with_seed(&key->fs, sizeof(key->fs), hash);
+ hash += key->fs.all;
break;
case PIPE_SHADER_COMPUTE:
hash = _mesa_hash_data_with_seed(&key->cs, sizeof(key->cs), hash);
break;
case PIPE_SHADER_TESS_CTRL:
- hash += key->hs.next_patch_inputs;
+ hash += key->hs.all;
+ hash += key->hs.required_patch_outputs.mask;
break;
case PIPE_SHADER_TESS_EVAL:
hash += key->ds.tcs_vertices_out;
hash += key->ds.prev_patch_outputs;
+ hash += key->ds.required_patch_inputs.mask;
break;
default:
/* No type specific information to hash for other stages. */
enum pipe_format format_conversion[PIPE_MAX_ATTRIBS];
} vs;
- struct {
- unsigned sprite_coord_enable:24;
- unsigned sprite_origin_upper_left:1;
- unsigned point_pos_stream_out:1;
- unsigned writes_psize:1;
- unsigned point_size_per_vertex:1;
- unsigned aa_point:1;
- unsigned stream_output_factor:3;
- unsigned primitive_id:1;
- unsigned triangle_strip:1;
+ union {
+ struct {
+ unsigned sprite_coord_enable:24;
+ unsigned sprite_origin_upper_left:1;
+ unsigned point_pos_stream_out:1;
+ unsigned writes_psize:1;
+ unsigned point_size_per_vertex:1;
+ unsigned aa_point:1;
+ unsigned stream_output_factor:3;
+ unsigned primitive_id:1;
+ unsigned triangle_strip:1;
+ };
+ uint64_t all;
} gs;
struct {
- unsigned primitive_mode:2;
- unsigned ccw:1;
- unsigned point_mode:1;
- unsigned spacing:2;
- unsigned patch_vertices_in:5;
+ union {
+ struct {
+ uint32_t next_patch_inputs;
+ unsigned primitive_mode:2;
+ unsigned ccw:1;
+ unsigned point_mode:1;
+ unsigned spacing:2;
+ unsigned patch_vertices_in:5;
+ };
+ uint64_t all;
+ };
struct d3d12_varying_info required_patch_outputs;
- uint32_t next_patch_inputs;
} hs;
struct {
unsigned tcs_vertices_out;
- struct d3d12_varying_info required_patch_inputs;
uint32_t prev_patch_outputs;
+ struct d3d12_varying_info required_patch_inputs;
} ds;
- struct {
- unsigned missing_dual_src_outputs : 2;
- unsigned frag_result_color_lowering : 4;
- unsigned cast_to_uint : 1;
- unsigned cast_to_int : 1;
- unsigned provoking_vertex : 2;
- unsigned manual_depth_range : 1;
- unsigned polygon_stipple : 1;
- unsigned remap_front_facing : 1;
- unsigned multisample_disabled : 1;
+ union {
+ struct {
+ unsigned missing_dual_src_outputs : 2;
+ unsigned frag_result_color_lowering : 4;
+ unsigned cast_to_uint : 1;
+ unsigned cast_to_int : 1;
+ unsigned provoking_vertex : 2;
+ unsigned manual_depth_range : 1;
+ unsigned polygon_stipple : 1;
+ unsigned remap_front_facing : 1;
+ unsigned multisample_disabled : 1;
+ };
+ unsigned short all;
} fs;
struct {