{"id":4847,"date":"2023-07-24T06:53:14","date_gmt":"2023-07-23T21:53:14","guid":{"rendered":"https:\/\/k.foolslab.net\/dailyreport\/?p=4847"},"modified":"2023-07-24T06:53:14","modified_gmt":"2023-07-23T21:53:14","slug":"2023-7-23","status":"publish","type":"post","link":"https:\/\/k.foolslab.net\/dailyreport\/2023-7-23\/","title":{"rendered":"2023\/7\/23(\u65e5)"},"content":{"rendered":"\n<p>\u30b7\u30e3\u30c8\u30ec\u30fc\u30bc\u3068\u3044\u3046\u3084\u3064\u306b\u521d\u3081\u3066\u5165\u3063\u3066\u307f\u305f\u3002\u5f92\u6b69\u570f\u5185\u306b\u3042\u308b\u306e\u306b\u4e00\u5ea6\u3082\u5229\u7528\u3057\u305f\u3053\u3068\u304c\u306a\u304f\u3001\u6c17\u306b\u306a\u3063\u3066\u3044\u305f\u3002<\/p>\n\n\n\n<p>\u590f\u5b63\u3060\u304b\u3089\u304b\u30a2\u30a4\u30b9\u304c\u7d50\u69cb\u58f2\u3089\u308c\u3066\u3044\u305f\u3002\u3082\u3061\u308d\u3093\u30b1\u30fc\u30ad\u3082\u3042\u308b\u3002\u3042\u3068\u5b9f\u306f\u548c\u83d3\u5b50\u3063\u307d\u3044\u3082\u306e\u3082\u7f6e\u3044\u3066\u3042\u3063\u3066\u3053\u308c\u306f\u610f\u5916\u3060\u3063\u305f\u3002<\/p>\n\n\n\n<p>\u3044\u304f\u3064\u304b\u8cb7\u3063\u3066\u3044\u3063\u305f\u304c\u3001\u5642\u901a\u308a\u78ba\u304b\u306b\u5b89\u304b\u3063\u305f\u3002\u6016\u3044\u307b\u3069\u306e\u6fc0\u5b89\u307f\u305f\u3044\u306a\u611f\u3058\u3067\u306f\u306a\u3044\u304c\u3001\u305d\u3093\u306a\u306b\u81c6\u305b\u305a\u6c17\u8efd\u306b\u8cb7\u3048\u308b\u4fa1\u683c\u611f\u3002\u4f8b\u3048\u308b\u306a\u3089\u30b5\u30a4\u30bc\u30ea\u30e4\u306b\u8fd1\u3044\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5fb9\u591c\u3057\u3066\u65e5\u4ed8\u3082\u5909\u308f\u3063\u3066\u3057\u307e\u3063\u305f\u304c\u3001\u30e2\u30c7\u30eb\u306e\u8868\u793a\u306b\u3053\u304e\u3064\u3051\u308b\u3053\u3068\u306b\u6210\u529f\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"381\" height=\"568\" src=\"https:\/\/k.foolslab.net\/dailyreport\/__wp_d\/wp-content\/uploads\/sites\/3\/2023\/07\/image.png\" alt=\"\" class=\"wp-image-4848\" srcset=\"https:\/\/k.foolslab.net\/dailyreport\/__wp_d\/wp-content\/uploads\/sites\/3\/2023\/07\/image.png 381w, https:\/\/k.foolslab.net\/dailyreport\/__wp_d\/wp-content\/uploads\/sites\/3\/2023\/07\/image-201x300.png 201w\" sizes=\"auto, (max-width: 381px) 100vw, 381px\" \/><\/figure>\n\n\n\n<p>\u3053\u308c\u304c\u305f\u3063\u305f1\u56de\u306edrawIndexedIndirect\u3067\u52d5\u3044\u3066\u3044\u308b\u3002\u7d20\u6674\u3089\u3057\u3044\uff01GPU\u8ca0\u8377\u306e\u8a08\u6e2c\u306a\u3069\u306f\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u5b9f\u969b\u3069\u306e\u304f\u3089\u3044\u52b9\u679c\u304c\u3042\u308b\u306e\u304b\u306f\u3088\u304f\u5206\u304b\u3089\u306a\u3044\u304c\u3002<\/p>\n\n\n\n<p>\u30c6\u30af\u30b9\u30c1\u30e3\u95a2\u4fc2\u306e\u51e6\u7406\u3067\u5c11\u3057\u4e8b\u524d\u306b\u4e88\u60f3\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u554f\u984c\u306b\u906d\u9047\u3057\u305f\u3002\u307e\u305a\u524d\u63d0\u3060\u304c\u3001drawIndirect1\u56de\u306b\u307e\u3068\u3081\u3088\u3046\u3068\u3059\u308b\u3068\u30c6\u30af\u30b9\u30c1\u30e3\u5207\u308a\u66ff\u3048\u306e\u554f\u984c\u306b\u3076\u3061\u3042\u305f\u308b\u3002\u8907\u6570\u56de\u306e\u30c9\u30ed\u30fc\u30b3\u30fc\u30eb\u306b\u5206\u304b\u308c\u3066\u3044\u308c\u3070\u305d\u306e\u5408\u9593\u306bbindDescriptorSet\u3092\u5165\u308c\u3089\u308c\u308b\u306e\u3060\u304c\u3001\u5168\u3066\u30921\u56de\u306b\u307e\u3068\u3081\u3066\u3044\u308b\u4ee5\u4e0a\u305d\u306e\u3088\u3046\u306a\u3053\u3068\u306f\u539f\u7406\u7684\u306b\u3067\u304d\u306a\u3044\u306e\u3060\u3002\u305d\u3053\u3067\u3001\u8907\u6570\u679a\u3042\u308b\u30c6\u30af\u30b9\u30c1\u30e3\u3092\u5168\u3066\u30c7\u30b9\u30af\u30ea\u30d7\u30bf\u914d\u5217\u306b\u8a70\u3081\u8fbc\u3093\u3067\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u30b7\u30a7\u30fc\u30c0\u3067\u53c2\u7167\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u5207\u308a\u66ff\u3048\u308b\u4f5c\u6226\u3067\u5b9f\u88c5\u3057\u305f\u3002Vulkan\u306e\u30c7\u30b9\u30af\u30ea\u30d7\u30bf\u30bb\u30c3\u30c8\u306b\u304a\u3044\u3066\u30c7\u30b9\u30af\u30ea\u30d7\u30bf\u304c\u914d\u5217\u306b\u306a\u308c\u308b\u4ed5\u69d8\u3092\u521d\u3081\u3066\u5229\u7528\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>layout(set = 0, binding = 1) uniform sampler2D texSampler&#91;];\r\n\r\nlayout(location = 2) in vec2 inTexcoord;\r\nlayout(location = 4) flat in uint inTexIndex;\r\n\r\nlayout(location = 0) out vec4 outColor;\r\n\r\nvoid main() {\r\n    outColor = texture(texSampler&#91;inTexIndex], inTexcoord);\r\n}<\/code><\/pre>\n\n\n\n<p>\u3068\u3053\u308d\u304c\u3001\u5b9f\u306f\u3053\u306e\u30e6\u30cb\u30d5\u30a9\u30fc\u30e0\u5909\u6570\u3092\u52d5\u7684\u306b\u5207\u308a\u66ff\u3048\u308b\u5b9f\u88c5\u306f\u62e1\u5f35\u6a5f\u80fd\u3092\u8981\u3059\u308b\u3082\u306e\u3060\u3063\u305f\u3089\u3057\u3044\u3002\u5fc5\u8981\u306a\u8a18\u8ff0\u3068\u3057\u3066\u3001\u307e\u305a\u30b7\u30a7\u30fc\u30c0\u306b\u3072\u3068\u3064\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#extension GL_EXT_nonuniform_qualifier : enable<\/code><\/pre>\n\n\n\n<p>\u305d\u308c\u304b\u3089Vulkan\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u5074\u306b\u4e00\u3064\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>auto devFeats = physicalDevice.getFeatures2();\r\nvk::PhysicalDeviceDescriptorIndexingFeatures feati;\r\nfeati.shaderSampledImageArrayNonUniformIndexing = true;\r\nfeati.runtimeDescriptorArray = true;\r\nfeati.descriptorBindingVariableDescriptorCount = true;\r\nfeati.pNext = &amp;devFeats;\r\n\r\nvk::DeviceCreateInfo deviceCreateInfo;\r\ndeviceCreateInfo.pNext = &amp;feati;<\/code><\/pre>\n\n\n\n<p>\u30c7\u30d0\u30a4\u30b9\u4f5c\u6210\u6642\u306bpNext\u306b\u3053\u3046\u3044\u3046\u3082\u306e\u3092\u6307\u5b9a\u3057\u3066\u3084\u3089\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002\u3053\u306e\u8a18\u8ff0\u306f<a href=\"https:\/\/github.com\/SaschaWillems\/Vulkan\/blob\/master\/examples\/descriptorindexing\/descriptorindexing.cpp\">Sascha Willems\u6c0f\u306e\u30b3\u30fc\u30c9<\/a>\u3092\u53c2\u8003\u306b\u3057\u305f\u3002\u3042\u306e\u4eba\u672c\u5f53\u306b\u306a\u3093\u3067\u3082\u3084\u3063\u3066\u308b\u3002<\/p>\n\n\n\n<p>\u5c11\u3005\u306e\u30a4\u30ec\u30ae\u30e5\u30e9\u30fc\u306f\u3042\u3063\u305f\u304c\u3001\u7121\u4e8b\u8868\u793a\u51fa\u6765\u3066\u826f\u304b\u3063\u305f\u3002\u4eca\u56de\u306f\u30dc\u30fc\u30f3\u5909\u5f62\u306e\u4ed5\u7d44\u307f\u3082\u6574\u5099\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u73fe\u72b6\u5236\u5fa1\u5074\u306e\u5b9f\u88c5\u304c\u51fa\u6765\u3066\u3044\u306a\u3044\u304b\u3089\u691c\u8a3c\u3067\u304d\u3066\u3044\u306a\u3044\u304c\u3001\u95a2\u7bc0\u3092\u52d5\u304b\u3059\u3053\u3068\u3082\u3061\u3083\u3093\u3068\u51fa\u6765\u308b\u306f\u305a\u3060\u3002\u697d\u3057\u307f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30b7\u30e3\u30c8\u30ec\u30fc\u30bc\u3068\u3044\u3046\u3084\u3064\u306b\u521d\u3081\u3066\u5165\u3063\u3066\u307f\u305f\u3002\u5f92\u6b69\u570f\u5185\u306b\u3042\u308b\u306e\u306b\u4e00\u5ea6\u3082\u5229\u7528\u3057\u305f\u3053\u3068\u304c\u306a\u304f\u3001\u6c17\u306b\u306a\u3063\u3066\u3044\u305f\u3002 \u590f\u5b63\u3060\u304b\u3089\u304b\u30a2\u30a4\u30b9\u304c\u7d50\u69cb\u58f2\u3089\u308c\u3066\u3044\u305f\u3002\u3082\u3061\u308d\u3093\u30b1\u30fc\u30ad\u3082\u3042\u308b\u3002\u3042\u3068\u5b9f\u306f\u548c\u83d3\u5b50\u3063\u307d\u3044\u3082\u306e\u3082\u7f6e\u3044\u3066\u3042\u3063\u3066\u3053\u308c\u306f\u610f\u5916\u3060\u3063\u305f\u3002 &hellip; <\/p>\n<div><a href=\"https:\/\/k.foolslab.net\/dailyreport\/2023-7-23\/\" class=\"more\">Read more &raquo;<span class=\"screen-reader-text\"> &#8220;2023\/7\/23(\u65e5)&#8221;<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4847","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/posts\/4847","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/comments?post=4847"}],"version-history":[{"count":3,"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/posts\/4847\/revisions"}],"predecessor-version":[{"id":4851,"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/posts\/4847\/revisions\/4851"}],"wp:attachment":[{"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/media?parent=4847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/categories?post=4847"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/tags?post=4847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}