Lines Matching defs:shader

66    struct iris_compiled_shader *shader;
76 iris_finalize_program(struct iris_compiled_shader *shader,
85 shader->prog_data = prog_data;
86 shader->streamout = streamout;
87 shader->system_values = system_values;
88 shader->num_system_values = num_system_values;
89 shader->kernel_input_size = kernel_input_size;
90 shader->num_cbufs = num_cbufs;
91 shader->bt = *bt;
93 ralloc_steal(shader, shader->prog_data);
94 ralloc_steal(shader->prog_data, (void *)prog_data->relocs);
95 ralloc_steal(shader->prog_data, prog_data->param);
96 ralloc_steal(shader, shader->streamout);
97 ralloc_steal(shader, shader->system_values);
312 iris_uses_image_atomic(const nir_shader *shader)
314 nir_foreach_function(function, shader) {
398 * Fix an uncompiled shader's stream output info.
404 * compile a specific shader variant. So, we remap these and simply store
521 /* This one is special because it reads from the shader constant
530 assert(load_size < b.shader->constant_data_size);
531 unsigned max_offset = b.shader->constant_data_size - load_size;
882 * Set up the binding table indices and apply to the shader.
926 * they are uploaded separately from shs->constbuf[], but from a shader
1128 brw_shader_perf_log(c, dbg, "Recompiling %s shader for program %s: %s\n",
1133 struct iris_compiled_shader *shader =
1135 const void *old_iris_key = &shader->key;
1159 unreachable("invalid shader stage");
1185 * Get the shader for the last enabled geometry stage.
1254 /* Append our new variant to the shader's variant list. */
1303 * Compile a vertex shader, and upload the assembly.
1310 struct iris_compiled_shader *shader)
1324 const struct iris_vs_prog_key *const key = &shader->key.vs;
1362 dbg_printf("Failed to compile vertex shader: %s\n", params.error_str);
1365 shader->compilation_failed = true;
1366 util_queue_fence_signal(&shader->ready);
1371 shader->compilation_failed = false;
1379 iris_finalize_program(shader, prog_data, so_decls, system_values,
1382 iris_upload_shader(screen, ish, shader, NULL, uploader, IRIS_CACHE_VS,
1385 iris_disk_cache_store(screen->disk_cache, ish, shader, key, sizeof(*key));
1391 * Update the current vertex shader variant.
1409 struct iris_compiled_shader *shader =
1412 if (added && !iris_disk_cache_retrieve(screen, uploader, ish, shader,
1414 iris_compile_vs(screen, uploader, &ice->dbg, ish, shader);
1417 if (shader->compilation_failed)
1418 shader = NULL;
1420 if (old != shader) {
1422 shader);
1429 unsigned urb_entry_size = shader ?
1430 ((struct brw_vue_prog_data *) shader->prog_data)->urb_entry_size : 0;
1482 * Compile a tessellation control shader, and upload the assembly.
1490 struct iris_compiled_shader *shader)
1509 const struct iris_tcs_prog_key *const key = &shader->key.tcs;
1567 dbg_printf("Failed to compile control shader: %s\n", params.error_str);
1570 shader->compilation_failed = true;
1571 util_queue_fence_signal(&shader->ready);
1576 shader->compilation_failed = false;
1580 iris_finalize_program(shader, prog_data, NULL, system_values,
1583 iris_upload_shader(screen, ish, shader, passthrough_ht, uploader,
1587 iris_disk_cache_store(screen->disk_cache, ish, shader, key, sizeof(*key));
1593 * Update the current tessellation control shader variant.
1624 struct iris_compiled_shader *shader;
1628 shader = find_or_add_variant(screen, tcs, IRIS_CACHE_TCS, &key,
1632 shader = iris_find_cached_shader(ice, IRIS_CACHE_TCS, sizeof(key), &key);
1635 if (shader == NULL) {
1636 shader = iris_create_shader_variant(screen, ice->shaders.cache,
1643 /* If the shader was not found in (whichever cache), call iris_compile_tcs
1644 * if either ish is NULL or the shader could not be found in the disk
1648 (tcs == NULL || !iris_disk_cache_retrieve(screen, uploader, tcs, shader,
1651 shader);
1654 if (shader->compilation_failed)
1655 shader = NULL;
1657 if (old != shader) {
1659 shader);
1665 unsigned urb_entry_size = shader ?
1666 ((struct brw_vue_prog_data *) shader->prog_data)->urb_entry_size : 0;
1672 * Compile a tessellation evaluation shader, and upload the assembly.
1679 struct iris_compiled_shader *shader)
1693 const struct iris_tes_prog_key *const key = &shader->key.tes;
1730 dbg_printf("Failed to compile evaluation shader: %s\n", params.error_str);
1733 shader->compilation_failed = true;
1734 util_queue_fence_signal(&shader->ready);
1739 shader->compilation_failed = false;
1747 iris_finalize_program(shader, prog_data, so_decls, system_values,
1750 iris_upload_shader(screen, ish, shader, NULL, uploader, IRIS_CACHE_TES,
1753 iris_disk_cache_store(screen->disk_cache, ish, shader, key, sizeof(*key));
1759 * Update the current tessellation evaluation shader variant.
1778 struct iris_compiled_shader *shader =
1781 if (added && !iris_disk_cache_retrieve(screen, uploader, ish, shader,
1783 iris_compile_tes(screen, uploader, &ice->dbg, ish, shader);
1786 if (shader->compilation_failed)
1787 shader = NULL;
1789 if (old != shader) {
1791 shader);
1797 unsigned urb_entry_size = shader ?
1798 ((struct brw_vue_prog_data *) shader->prog_data)->urb_entry_size : 0;
1811 * Compile a geometry shader, and upload the assembly.
1818 struct iris_compiled_shader *shader)
1832 const struct iris_gs_prog_key *const key = &shader->key.gs;
1868 dbg_printf("Failed to compile geometry shader: %s\n", params.error_str);
1871 shader->compilation_failed = true;
1872 util_queue_fence_signal(&shader->ready);
1877 shader->compilation_failed = false;
1885 iris_finalize_program(shader, prog_data, so_decls, system_values,
1888 iris_upload_shader(screen, ish, shader, NULL, uploader, IRIS_CACHE_GS,
1891 iris_disk_cache_store(screen->disk_cache, ish, shader, key, sizeof(*key));
1897 * Update the current geometry shader variant.
1909 struct iris_compiled_shader *shader = NULL;
1918 shader = find_or_add_variant(screen, ish, IRIS_CACHE_GS, &key,
1921 if (added && !iris_disk_cache_retrieve(screen, uploader, ish, shader,
1923 iris_compile_gs(screen, uploader, &ice->dbg, ish, shader);
1926 if (shader->compilation_failed)
1927 shader = NULL;
1930 if (old != shader) {
1932 shader);
1938 unsigned urb_entry_size = shader ?
1939 ((struct brw_vue_prog_data *) shader->prog_data)->urb_entry_size : 0;
1945 * Compile a fragment (pixel) shader, and upload the assembly.
1952 struct iris_compiled_shader *shader,
1966 const struct iris_fs_prog_key *const key = &shader->key.fs;
1980 /* On Gfx11+, shader RT write messages have a "Null Render Target" bit
2008 dbg_printf("Failed to compile fragment shader: %s\n", params.error_str);
2011 shader->compilation_failed = true;
2012 util_queue_fence_signal(&shader->ready);
2017 shader->compilation_failed = false;
2021 iris_finalize_program(shader, prog_data, NULL, system_values,
2024 iris_upload_shader(screen, ish, shader, NULL, uploader, IRIS_CACHE_FS,
2027 iris_disk_cache_store(screen->disk_cache, ish, shader, key, sizeof(*key));
2033 * Update the current fragment shader variant.
2056 struct iris_compiled_shader *shader =
2060 if (added && !iris_disk_cache_retrieve(screen, uploader, ish, shader,
2062 iris_compile_fs(screen, uploader, &ice->dbg, ish, shader, last_vue_map);
2065 if (shader->compilation_failed)
2066 shader = NULL;
2068 if (old != shader) {
2072 shader);
2086 * When the shader feeding the rasterizer's output interface changes, we
2091 struct iris_compiled_shader *shader)
2093 struct brw_vue_prog_data *vue_prog_data = (void *) shader->prog_data;
2115 iris_shader_variant_reference(&ice->shaders.last_vue_shader, shader);
2122 struct iris_compiled_shader *shader = ice->shaders.prog[stage];
2124 if (!shader || !shader->prog_data->has_ubo_pull)
2129 shader->num_system_values > 0 && shs->sysvals_need_upload;
2149 * Update the current shader variants for the given state.
2214 struct iris_compiled_shader *shader = ice->shaders.prog[last_stage];
2216 update_last_vue_map(ice, shader);
2217 if (ice->state.streamout != shader->streamout) {
2218 ice->state.streamout = shader->streamout;
2245 struct iris_compiled_shader *shader)
2258 const struct iris_cs_prog_key *const key = &shader->key.cs;
2281 dbg_printf("Failed to compile compute shader: %s\n", params.error_str);
2283 shader->compilation_failed = true;
2284 util_queue_fence_signal(&shader->ready);
2289 shader->compilation_failed = false;
2293 iris_finalize_program(shader, prog_data, NULL, system_values,
2297 iris_upload_shader(screen, ish, shader, NULL, uploader, IRIS_CACHE_CS,
2300 iris_disk_cache_store(screen->disk_cache, ish, shader, key, sizeof(*key));
2318 struct iris_compiled_shader *shader =
2322 if (added && !iris_disk_cache_retrieve(screen, uploader, ish, shader,
2324 iris_compile_cs(screen, uploader, &ice->dbg, ish, shader);
2327 if (shader->compilation_failed)
2328 shader = NULL;
2330 if (old != shader) {
2332 shader);
2380 * Instead of each shader type having its own layout based on IDs passed
2443 * Actual shader compilation to assembly happens later, at first use.
2531 struct iris_compiled_shader *shader =
2535 /* Append our new variant to the shader's variant list. */
2536 list_addtail(&shader->link, &ish->variants);
2538 if (!iris_disk_cache_retrieve(screen, uploader, ish, shader,
2540 iris_compile_cs(screen, uploader, &ice->dbg, ish, shader);
2557 struct iris_compiled_shader *shader = job->shader;
2561 iris_compile_vs(screen, uploader, dbg, ish, shader);
2564 iris_compile_tcs(screen, NULL, uploader, dbg, ish, shader);
2567 iris_compile_tes(screen, uploader, dbg, ish, shader);
2570 iris_compile_gs(screen, uploader, dbg, ish, shader);
2573 iris_compile_fs(screen, uploader, dbg, ish, shader, NULL);
2577 unreachable("Invalid shader stage.");
2693 unreachable("Invalid shader stage.");
2699 struct iris_compiled_shader *shader =
2704 /* Append our new variant to the shader's variant list. */
2705 list_addtail(&shader->link, &ish->variants);
2707 if (!iris_disk_cache_retrieve(screen, uploader, ish, shader,
2709 assert(!util_queue_fence_is_signalled(&shader->ready));
2716 job->shader = shader;
2739 list_for_each_entry_safe(struct iris_compiled_shader, shader,
2741 list_del(&shader->link);
2743 iris_shader_variant_reference(&shader, NULL);
2778 * Binds an uncompiled shader as the current one for a particular stage.
2779 * Updates dirty tracking to account for the shader's NOS.
2902 /* Fragment shader outputs influence HasWriteableRT */