Bug 23714 - Alpha issue with textures in clutter demo
Summary: Alpha issue with textures in clutter demo
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/R600 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-04 11:18 UTC by Kevin DeKorte
Modified: 2009-10-02 11:10 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Output of test app with line 2088 in r700_assembler.c = 1.0 (1.23 KB, image/png)
2009-09-04 12:27 UTC, Kevin DeKorte
Details

Description Kevin DeKorte 2009-09-04 11:18:34 UTC
See bug: http://bugs.freedesktop.org/show_bug.cgi?id=23585

Use the demo in there. In the mintest case the black around the icon should be transparent. I believe there is an alpha issue here. Using software mode it is slow but correct. And the coloring issue is the same in direct and in indirect mode.
Comment 1 Kevin DeKorte 2009-09-04 12:26:28 UTC
Does not appear to be a duplicate of 23657. Tried editing line 2088 in r700_assembler.c and found the value to always be 0 in the test case, tried setting to 1 and it made a real mess. Attaching image with saturate=1.0

Looked at r700SetBlendState found that ctx->Color.BlendEnabled alternated between 0 and 1. Tried setting always to 1 did not change anything. Found the BlendEquationRGB and BlendEquationA were GL_FUNC_ADD.

line 516 of r700_state.c didn't seem to identify my rv635 as an r600, unless the CHIP_FAMILY_R600 is specific to R600 based devices only.

context->radeon.radeonScreen->chip_family == CHIP_FAMILY_R600, but I forced that if block to run and it didn't make any change.

Also looked at r700BlendColor and found that the color always appeared to be black, however altering these values didn't seem to affect anything. I am curious as to the call to SetBlendColor at line 1723 in r700_state.c as to what the values below it do.



lspci -vvvv info for my card...

01:00.0 VGA compatible controller: ATI Technologies Inc Mobility Radeon HD 3600 Series (prog-if 00 [VGA controller])
	Subsystem: ASUSTeK Computer Inc. Device 01da
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 16
	Region 0: Memory at d0000000 (64-bit, prefetchable) [size=256M]
	Region 2: Memory at fe9e0000 (64-bit, non-prefetchable) [size=64K]
	Region 4: I/O ports at c000 [size=256]
	[virtual] Expansion ROM at fe900000 [disabled] [size=128K]
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [58] Express (v2) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
			ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 128 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Latency L0 <64ns, L1 <1us
			ClockPM- Surprise- LLActRep- BwNot-
		LnkCtl:	ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
		DevCap2: Completion Timeout: Not Supported, TimeoutDis-
		DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
		LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
			 Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
			 Compliance De-emphasis: -6dB
		LnkSta2: Current De-emphasis Level: -6dB
	Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
		Address: 0000000000000000  Data: 0000
	Capabilities: [100] Vendor Specific Information <?>
	Kernel driver in use: radeon
Comment 2 Kevin DeKorte 2009-09-04 12:27:14 UTC
Created attachment 29237 [details]
Output of test app with line 2088 in r700_assembler.c = 1.0
Comment 3 Alex Deucher 2009-09-04 13:11:48 UTC
(In reply to comment #1)
> Does not appear to be a duplicate of 23657. Tried editing line 2088 in
> r700_assembler.c and found the value to always be 0 in the test case, tried
> setting to 1 and it made a real mess. Attaching image with saturate=1.0
> 
> Looked at r700SetBlendState found that ctx->Color.BlendEnabled alternated
> between 0 and 1. Tried setting always to 1 did not change anything. Found the
> BlendEquationRGB and BlendEquationA were GL_FUNC_ADD.
> 
> line 516 of r700_state.c didn't seem to identify my rv635 as an r600, unless
> the CHIP_FAMILY_R600 is specific to R600 based devices only.
> 
> context->radeon.radeonScreen->chip_family == CHIP_FAMILY_R600, but I forced
> that if block to run and it didn't make any change.

CHIP_FAMILY_R600 only refers to the original R600 card. see radeon_chipset.h for the full list of families. Most of the rv6xx and rv7xx share the same state setup.  R600 is the most significantly different since it lacks per-MRT blending.

> 
> Also looked at r700BlendColor and found that the color always appeared to be
> black, however altering these values didn't seem to affect anything. I am
> curious as to the call to SetBlendColor at line 1723 in r700_state.c as to what
> the values below it do.

blend color is only used if the blend function specifies an constant color, otherwise it's a combination of the src and dst based on the blend factors and blend equation.

The problem may also be due to a bad texture format.  Need to look at the code in your demo and seem what it's doing.
Comment 4 Alex Deucher 2009-10-02 11:10:12 UTC
Should be fixed now.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.