mirror of
https://github.com/elwrcl/intel-hard-graphics.git
synced 2026-10-31 10:58:03 +03:00
hasvk: gen7'de fp64/int64/int16 ve 16-bit storage'i ac
Bu dort ozellik pdevice->info.ver >= 8 ile kapatilmisti. Kapi anv'den
miras; Ivy Bridge'den turetilmemis. IVB PRM ve elk'in kendi register
tablolari aksini soyluyor:
fp64 -> gfx7_hw_type[] icinde DF var : native
int16 -> W / UW var : native
int64 -> Q / UQ yok (gen8+) : nir_lower_int64 ile
fp16 -> HF yok : gercekten yok, false kalir
16-bit bellek erisimi icin gereken indirgeme zaten kuruluydu:
elk_nir.c:get_mem_access_size_align() verx10 < 75 icin her sub-dword
erisimi 32-bit dword'e ceviriyor (load'da shift+extract, store'da atomic
RMW). f16<->f32 donusum komutlari da IVB'de mevcut.
VK-GL-CTS ile olculdu (8086:0166, IVB GT2):
fp64 : 9402 vaka -> 3975 Pass, 20 Fail (hepsi float_controls kenar
durumu: vertex'te dot/normalize ve rounding_rtz_round_ev)
int64 : spirv_assembly.type.{scalar,vec2} -> 160 Pass, 0 Fail
(vertex varyantlari vertexPipelineStoresAndAtomics'ten atliyor)
16-bit: daha once 948/948 atlanan set -> 500 Pass, 0 Fail
int16 CTS ile tek basina sinanamiyor (her 16-bit vakasi ayrica
uniformAndStorageBuffer16BitAccess istiyor), dayanak register tablosu.
fp64 float-controls ozellikleri true birakildi; gen7'de calismalarinin
sarti olan vec4 FLOAT_CONTROL_MODE emisyonu ayri commit'te eklendi.
Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
1 file changed
+27
-6
@@ -439,17 +439,30 @@ get_features(const struct anv_physical_device *pdevice,
|
||||
.shaderStorageImageArrayDynamicIndexing = true,
|
||||
.shaderClipDistance = true,
|
||||
.shaderCullDistance = true,
|
||||
.shaderFloat64 = pdevice->info.ver >= 8 &&
|
||||
pdevice->info.has_64bit_float,
|
||||
.shaderInt64 = pdevice->info.ver >= 8,
|
||||
.shaderInt16 = pdevice->info.ver >= 8,
|
||||
/* DENEY: bu ucu anv'den ver >= 8 sartiyla miras alinmisti. Gen7'de
|
||||
* has_64bit_float zaten true ve crocus ayni donanimda
|
||||
* GL_ARB_gpu_shader_fp64 sunuyor, yani elk fp64 kodu uretebiliyor.
|
||||
* int64/int16 icin donanim destegi yok ama elk_compiler.c:62 civarinda
|
||||
* eksik olani nir_lower_*64/16 ile yazilima indirgiyor. CTS ile
|
||||
* dogrulanacak; gerilerse geri alinir. */
|
||||
.shaderFloat64 = pdevice->info.has_64bit_float,
|
||||
.shaderInt64 = true,
|
||||
.shaderInt16 = true,
|
||||
.shaderResourceMinLod = false,
|
||||
.variableMultisampleRate = true,
|
||||
.inheritedQueries = true,
|
||||
|
||||
/* Vulkan 1.1 */
|
||||
.storageBuffer16BitAccess = pdevice->info.ver >= 8 && !pdevice->instance->no_16bit,
|
||||
.uniformAndStorageBuffer16BitAccess = pdevice->info.ver >= 8 && !pdevice->instance->no_16bit,
|
||||
/* DENEY: gen7'de de aciliyor. 16-bit bellek erisimi icin gereken
|
||||
* indirgeme zaten kurulu -- elk_nir.c:get_mem_access_size_align()
|
||||
* verx10 < 75 icin her sub-dword erisimi 32-bit dword'e cevirip
|
||||
* load'da shift+extract, store'da atomic RMW uretiyor. 16-bit tamsayi
|
||||
* ALU'su gen7'de native (gfx7_hw_type[] W/UW), fp16 ALU'su ise
|
||||
* lower_bit_size_callback tarafindan 32-bit'e indirgeniyor ve
|
||||
* f16to32/f32to16 donusum komutlari IVB'de mevcut.
|
||||
* CTS ile dogrulanacak; gerilerse geri alinir. */
|
||||
.storageBuffer16BitAccess = !pdevice->instance->no_16bit,
|
||||
.uniformAndStorageBuffer16BitAccess = !pdevice->instance->no_16bit,
|
||||
.storagePushConstant16 = pdevice->info.ver >= 8,
|
||||
.storageInputOutput16 = false,
|
||||
.multiview = true,
|
||||
@@ -882,6 +895,14 @@ get_properties_1_2(const struct anv_physical_device *pdevice,
|
||||
p->shaderRoundingModeRTZFloat32 = true;
|
||||
p->shaderSignedZeroInfNanPreserveFloat32 = true;
|
||||
|
||||
/* Gen7 DF float-controls'u donanimda destekliyor: IVB PRM vol4 part3,
|
||||
* CR0 bit 6 "Double Precision Denorm Mode" ve bit 5:4 "Rounding Mode".
|
||||
* Eksik olan derleyici tarafiydi -- vec4 arka ucu (VS/GS/TCS/TES) yalnizca
|
||||
* RND_MODE emit ediyor, denorm modunu hic yazmiyordu. Bu artik
|
||||
* vec4_visitor::emit_shader_float_controls_execution_mode() icinde
|
||||
* FLOAT_CONTROL_MODE ile duzeltildi, dolayisiyla bu dordu gen7'de de
|
||||
* dogru sekilde vaat edilebiliyor.
|
||||
*/
|
||||
p->shaderDenormFlushToZeroFloat64 = true;
|
||||
p->shaderDenormPreserveFloat64 = true;
|
||||
p->shaderRoundingModeRTEFloat64 = true;
|
||||
|
||||
Reference in new issue
Block a user