当前位置: 首页 > news >正文

做网站的销售怎么样网站开发专业就业培训学校

做网站的销售怎么样,网站开发专业就业培训学校,一般网站建设公司怎么收费,怎么做点图片链接网站概述 本来想将一个完整的可以从hlsl-dxil-spirv-nir-code的项目划分为两个动态库a.dll与b.dll。应用程序调用a.dll与b.dll执行相同的过程。 a.dll#xff1a;执行dxil-spirv-nir前端相关的转换。 b.dll#xff1a;执行nir-code的转换。 应用程序调用dxc实现hlsl-dxil的过程执行dxil-spirv-nir前端相关的转换。 b.dll执行nir-code的转换。 应用程序调用dxc实现hlsl-dxil的过程调用a.dll实现dxil-spirv-nir过程调用b.dll实现nir-code过程。 想法是好的可以使代码结构清晰。 不过出现了问题在b.dll实现nir-code过程出现崩溃 分析 在spirv-nir过程是可以的在nir-code过程中执行pass出现错误 nir_shader* nir spirv_to_nir((uint32_t*)spirv.data, word_count, NULL, 0,entry_point.stage, entry_point.name,spirv_opts, nir_opts);原因是nir_opts参数控制了很多lower的行为。在进入b.dll执行nir-code过程nir_opts所有的数据都为0了。 后来想一想每个动态库都是一个独立的程序全局变量不能跨程序保留值。 查阅nir结构看看有没有保留的地方结果发现了如下 typedef struct nir_shader {gc_ctx *gctx;/** list of uniforms (nir_variable) */struct exec_list variables;/** Set of driver-specific options for the shader.** The memory for the options is expected to be kept in a single static* copy by the driver.*/const struct nir_shader_compiler_options *options;/** Various bits of compile-time information about a given shader */struct shader_info info;/** list of nir_function */struct exec_list functions;/*** The size of the variable space for load_input_*, load_uniform_*, etc.* intrinsics. This is in back-end specific units which is likely one of* bytes, dwords, or vec4s depending on context and back-end.*/unsigned num_inputs, num_uniforms, num_outputs;/** Size in bytes of required implicitly bound global memory */unsigned global_mem_size;/** Size in bytes of required scratch space */unsigned scratch_size;/** Constant data associated with this shader.** Constant data is loaded through load_constant intrinsics (as compared to* the NIR load_const instructions which have the constant value inlined* into them). This is usually generated by nir_opt_large_constants (so* shaders dont have to load_const into a temporary array when they want* to indirect on a const array).*/void *constant_data;/** Size of the constant data associated with the shader, in bytes */unsigned constant_data_size;struct nir_xfb_info *xfb_info;unsigned printf_info_count;u_printf_info *printf_info; } nir_shader;const struct nir_shader_compiler_options *options;就是保存option的地方。 在调用完a.dll之后通过手动给他们复制发现暂时可以解决问题。 不过运行到后面又出现问题 NIR_PASS_V(nir, nir_split_var_copies);在上面pass宏定义中执行nir_shader_serialize_deserialize函数崩溃在该函数中执行glsl_array_type函数崩溃。 const glsl_type * glsl_array_type(const glsl_type *element,unsigned array_size,unsigned explicit_stride) {/* Ensure theres no internal padding, to avoid multiple hashes for same key. */STATIC_ASSERT(sizeof(struct array_key) (3 * sizeof(uintptr_t)));struct array_key key { 0 };key.element (uintptr_t)element;key.array_size array_size;key.explicit_stride explicit_stride;const uint32_t key_hash array_key_hash(key);simple_mtx_lock(glsl_type_cache_mutex);assert(glsl_type_cache.users 0); //崩溃在这里glsl_type_cache全局变量都是0void *mem_ctx glsl_type_cache.mem_ctx;if (glsl_type_cache.array_types NULL) {glsl_type_cache.array_types array_key_table_create(mem_ctx);}struct hash_table *array_types glsl_type_cache.array_types;const struct hash_entry *entry _mesa_hash_table_search_pre_hashed(array_types, key_hash, key);if (entry NULL) {linear_ctx *lin_ctx glsl_type_cache.lin_ctx;const glsl_type *t make_array_type(lin_ctx, element, array_size, explicit_stride);struct array_key *stored_key linear_zalloc(lin_ctx, struct array_key);memcpy(stored_key, key, sizeof(key));entry _mesa_hash_table_insert_pre_hashed(array_types, key_hash,stored_key,(void *) t);}const glsl_type *t (const glsl_type *) entry-data;simple_mtx_unlock(glsl_type_cache_mutex);assert(t-base_type GLSL_TYPE_ARRAY);assert(t-length array_size);assert(t-fields.array element);return t; }发现glsl_type_cache全局结构体成员变量都是0。 至此可以得出结论在spirv-nir转换的过程中对很多全局变量赋值了如果不在同一个动态库中调用那么就会出现全局变量统统为0的情况。 解决 将dxil-spirv-nir-code写到同一个动态库a.dll中应用程序调用dxc实现hlsl-dxil的过程调用a.dll实现dxil-spirv-nir-code过程发现问题全部解决。
http://www.hkea.cn/news/14366871/

相关文章:

  • 深圳市网站设计公司网店美工主要负责哪些工作
  • 网站建设技术及服务承诺单页面视频网站
  • 域名买好了怎么做网站今天正式封城
  • 音乐网站制作源代码深圳建站网站
  • 马克 扎克伯格大学做的网站做运营有前途吗
  • 网站首页视频背景网站建设点击打开指定网页
  • 代做网站怎么进行域名备案做新闻类网站
  • 中山蚂蚁网站开发常用的seo查询工具有哪些
  • 网站如何不被收录模板下载ppt
  • 网站策划书 范文关于地产设计网站
  • 网站建设确认函网站开发客户的思路总结
  • 怎么做网站首页wordpress 页面 评论链接 新窗口打开
  • 这个域名的网站做违法的事wordpress directory
  • 可以建网站的软件大连网站优化步骤
  • 网站策划招聘网站建设一般好久到期
  • 小吃网站建设wordpress主题验证失败
  • 网站推广制作建设银行网站最近都打不开吗
  • 网站规划书 确定网站建设目的赣州新闻联播视频
  • 广州无线电集团有限公司安全优化大师
  • 百度蜘蛛抓取新网站做跨境电商要什么费用
  • 学校网站建设的背景把网站制作成app
  • 学校网站aspwordpress 自定义搜索
  • 榆次网站建设资讯网站模版
  • 网站开发工具总结社交网站建设网
  • 桂林北站地图百度网站上传
  • 中国兰州网pc主站学校网站模板免费
  • 网站建设需要桂ajax吗创意设计图片手绘黑白
  • 各大网站的网址未来的网站建设想法
  • 制作企业网站素材视频杭州万户网络
  • wordpress站酷主题网站是用什么做的