Lines Matching defs:shader
62 enum pipe_shader_type shader)
97 struct d3d12_shader *shader = rzalloc(sel, d3d12_shader);
98 shader->key = *key;
99 shader->nir = nir;
100 sel->current = shader;
121 shader->has_default_ubo0 = num_uniforms_before_lower_to_ubo > 0 &&
134 NIR_PASS_V(nir, d3d12_lower_state_vars, shader);
146 opts.no_ubo0 = !shader->has_default_ubo0;
147 opts.last_ubo_is_not_arrayed = shader->num_state_vars > 0;
163 shader->begin_srv_binding = (UINT_MAX);
169 shader->srv_bindings[var->data.binding + i].dimension = resource_dimension(glsl_get_sampler_dim(type_no_array));
171 shader->begin_srv_binding = MIN2(var->data.binding, shader->begin_srv_binding);
172 shader->end_srv_binding = MAX2(var->data.binding + count, shader->end_srv_binding);
180 shader->uav_bindings[var->data.driver_location + i].format = var->data.image.format;
181 shader->uav_bindings[var->data.driver_location + i].dimension = resource_dimension(glsl_get_sampler_dim(type_no_array));
188 unsigned num_ubo_bindings = nir->info.num_ubos - (shader->state_vars_used ? 1 : 0);
189 for(unsigned i = shader->has_default_ubo0 ? 0 : 1; i < num_ubo_bindings; ++i) {
190 shader->cb_bindings[shader->num_cb_bindings++].binding = i;
222 blob_finish_get_buffer(&tmp, &shader->bytecode, &shader->bytecode_length);
229 fwrite(shader->bytecode, sizeof(char), shader->bytecode_length, fp);
233 return shader;
322 * If a shader statically assigns a value to gl_FragDepth, and there
323 * is an execution path through the shader that does not set
325 * undefined for executions of the shader that take that path. That
600 /* Nothing to do if there is a user geometry shader bound */
604 /* Fill the geometry shader variant key */
631 /* Check if the currently bound geometry shader variant is correct */
649 /* Nothing to do if there is a user tess ctrl shader bound */
662 /* Check if the currently bound tessellation control shader variant is correct */
706 /* Because we only add varyings we check that a shader has at least the expected in-
898 /* Set the provoking vertex based on the previous shader output. Only set the
1083 /* Clone the NIR shader */
1229 /* prepend the new shader in the selector chain and pick it */
1255 unreachable("shader type not supported");
1280 unreachable("shader type not supported");
1361 /* Keep this initial shader as the blue print for possible variants */
1365 * We must compile some shader here, because if the previous or a next shaders exists later
1366 * when the shaders are bound, then the key evaluation in the shader selector will access
1367 * the current variant of these prev and next shader, and we can only assign
1373 * we must go through the shader selector here to create a compilable variant.
1375 * shader.
1377 * TODO: get rid of having to compiling the shader here if it can be forseen that it will
1378 * be thrown away (i.e. it depends on states that are likely to change before the shader is
1396 const struct pipe_shader_state *shader)
1403 if (shader->type == PIPE_SHADER_IR_NIR) {
1404 nir = (nir_shader *)shader->ir.nir;
1406 assert(shader->type == PIPE_SHADER_IR_TGSI);
1407 nir = tgsi_to_nir(shader->tokens, ctx->base.screen, false);
1411 memcpy(&sel->so_info, &shader->stream_output, sizeof(sel->so_info));
1443 const struct pipe_compute_state *shader)
1450 if (shader->ir_type == PIPE_SHADER_IR_NIR) {
1451 nir = (nir_shader *)shader->prog;
1453 assert(shader->ir_type == PIPE_SHADER_IR_TGSI);
1454 nir = tgsi_to_nir(shader->prog, ctx->base.screen, false);
1524 auto shader = sel->first;
1525 while (shader) {
1526 free(shader->bytecode);
1527 shader = shader->next_variant;